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

Method btnYesClick

src/Menu/AbandonGameState.cpp:115–129  ·  view source on GitHub ↗

* Goes back to the Main Menu. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

113 * @param action Pointer to an action.
114 */
115void AbandonGameState::btnYesClick(Action *)
116{
117 if (!_game->getSavedGame()->isIronman())
118 {
119 Screen::updateScale(Options::geoscapeScale, Options::geoscapeScale, Options::baseXGeoscape, Options::baseYGeoscape, true);
120 _game->getScreen()->resetDisplay(false);
121
122 _game->setState(new MainMenuState(_game));
123 _game->setSavedGame(0);
124 }
125 else
126 {
127 _game->pushState(new SaveGameState(_game, OPT_GEOSCAPE, SAVE_IRONMAN_END));
128 }
129}
130
131/**
132 * Closes the window.

Callers

nothing calls this directly

Calls 7

isIronmanMethod · 0.80
getSavedGameMethod · 0.80
resetDisplayMethod · 0.80
getScreenMethod · 0.80
setStateMethod · 0.80
setSavedGameMethod · 0.80
pushStateMethod · 0.80

Tested by

no test coverage detected