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

Method btnOkClick

src/Basescape/SoldierInfoState.cpp:607–615  ·  view source on GitHub ↗

* Returns to the previous screen. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

605 * @param action Pointer to an action.
606 */
607void SoldierInfoState::btnOkClick(Action *)
608{
609 _game->popState();
610 if (_game->getSavedGame()->getMonthsPassed() > -1 && Options::storageLimitsEnforced && _base != 0 && _base->storesOverfull())
611 {
612 _game->pushState(new SellState(_game, _base));
613 _game->pushState(new ErrorMessageState(_game, tr("STR_STORAGE_EXCEEDED").arg(_base->getName()).c_str(), _palette, Palette::blockOffset(15)+1, "BACK01.SCR", 0));
614 }
615}
616
617/**
618 * Goes to the previous soldier.

Callers

nothing calls this directly

Calls 7

getMonthsPassedMethod · 0.80
getSavedGameMethod · 0.80
storesOverfullMethod · 0.80
pushStateMethod · 0.80
argMethod · 0.60
popStateMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected