* Goes back to the Main Menu. * @param action Pointer to an action. */
| 113 | * @param action Pointer to an action. |
| 114 | */ |
| 115 | void 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. |
nothing calls this directly
no test coverage detected