* Loads previous options and returns to the previous screen. * @param action Pointer to an action. */
| 251 | * @param action Pointer to an action. |
| 252 | */ |
| 253 | void OptionsBaseState::btnCancelClick(Action *) |
| 254 | { |
| 255 | Options::reload = false; |
| 256 | Options::load(); |
| 257 | SDL_WM_GrabInput(Options::captureMouse); |
| 258 | Screen::updateScale(Options::newBattlescapeScale, Options::battlescapeScale, Options::baseXBattlescape, Options::baseYBattlescape, _origin == OPT_BATTLESCAPE); |
| 259 | Screen::updateScale(Options::newGeoscapeScale, Options::geoscapeScale, Options::baseXGeoscape, Options::baseYGeoscape, _origin != OPT_BATTLESCAPE); |
| 260 | _game->setVolume(Options::soundVolume, Options::musicVolume, Options::uiVolume); |
| 261 | _game->popState(); |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * Restores the Options to default settings. |