* Selects the next unit. * @param action Pointer to an action. */
| 674 | * @param action Pointer to an action. |
| 675 | */ |
| 676 | void UnitInfoState::btnNextClick(Action *action) |
| 677 | { |
| 678 | if (_parent) |
| 679 | { // so we are here from a Battlescape Game |
| 680 | _parent->selectNextPlayerUnit(false, false, _fromInventory); |
| 681 | } |
| 682 | else |
| 683 | { // so we are here from the Craft Equipment screen |
| 684 | _battleGame->selectNextPlayerUnit(false, false, true); |
| 685 | } |
| 686 | _unit = _battleGame->getSelectedUnit(); |
| 687 | if (_unit != 0) |
| 688 | { |
| 689 | init(); |
| 690 | } |
| 691 | else |
| 692 | { |
| 693 | exitClick(action); |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | /** |
| 698 | * Exits the screen. |
nothing calls this directly
no test coverage detected