MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / btnNextClick

Method btnNextClick

src/Battlescape/UnitInfoState.cpp:676–695  ·  view source on GitHub ↗

* Selects the next unit. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

674 * @param action Pointer to an action.
675 */
676void 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.

Callers

nothing calls this directly

Calls 3

initFunction · 0.85
getSelectedUnitMethod · 0.80
selectNextPlayerUnitMethod · 0.45

Tested by

no test coverage detected