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

Method btnCancelClick

src/Menu/OptionsBaseState.cpp:253–262  ·  view source on GitHub ↗

* Loads previous options and returns to the previous screen. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

251 * @param action Pointer to an action.
252 */
253void 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.

Callers

nothing calls this directly

Calls 3

loadFunction · 0.85
setVolumeMethod · 0.80
popStateMethod · 0.45

Tested by

no test coverage detected