| 158 | } |
| 159 | |
| 160 | void OptionsBaseState::restart(Game *game, OptionsOrigin origin) |
| 161 | { |
| 162 | if (origin == OPT_MENU) |
| 163 | { |
| 164 | game->setState(new MainMenuState(game)); |
| 165 | } |
| 166 | else if (origin == OPT_GEOSCAPE) |
| 167 | { |
| 168 | game->setState(new GeoscapeState(game)); |
| 169 | } |
| 170 | else if (origin == OPT_BATTLESCAPE) |
| 171 | { |
| 172 | game->setState(new GeoscapeState(game)); |
| 173 | BattlescapeState *bs = new BattlescapeState(game); |
| 174 | game->pushState(bs); |
| 175 | game->getSavedGame()->getSavedBattle()->setBattleState(bs); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * Initializes UI colors according to origin. |
nothing calls this directly
no test coverage detected