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

Method btnOkClick

src/Basescape/CraftsState.cpp:148–157  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

146 * @param action Pointer to an action.
147 */
148void CraftsState::btnOkClick(Action *)
149{
150 _game->popState();
151
152 if (_game->getSavedGame()->getMonthsPassed() > -1 && Options::storageLimitsEnforced && _base->storesOverfull())
153 {
154 _game->pushState(new SellState(_game, _base));
155 _game->pushState(new ErrorMessageState(_game, tr("STR_STORAGE_EXCEEDED").arg(_base->getName()).c_str(), _palette, Palette::blockOffset(15)+1, "BACK01.SCR", 0));
156 }
157}
158
159/**
160 * Shows the selected craft's info.

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