* Selects the previous unit. * @param action Pointer to an action. */
| 649 | * @param action Pointer to an action. |
| 650 | */ |
| 651 | void UnitInfoState::btnPrevClick(Action *action) |
| 652 | { |
| 653 | if (_parent) |
| 654 | { // so we are here from a Battlescape Game |
| 655 | _parent->selectPreviousPlayerUnit(false, false, _fromInventory); |
| 656 | } |
| 657 | else |
| 658 | { // so we are here from the Craft Equipment screen |
| 659 | _battleGame->selectPreviousPlayerUnit(false, false, true); |
| 660 | } |
| 661 | _unit = _battleGame->getSelectedUnit(); |
| 662 | if (_unit != 0) |
| 663 | { |
| 664 | init(); |
| 665 | } |
| 666 | else |
| 667 | { |
| 668 | exitClick(action); |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | /** |
| 673 | * Selects the next unit. |
nothing calls this directly
no test coverage detected