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

Method screenClick

src/Geoscape/VictoryState.cpp:117–144  ·  view source on GitHub ↗

* Shows the next screen in the slideshow * or goes back to the Main Menu. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

115 * @param action Pointer to an action.
116 */
117void VictoryState::screenClick(Action *)
118{
119 if (_screen >= 0)
120 {
121 _bg[_screen]->setVisible(false);
122 _text[_screen]->setVisible(false);
123 }
124
125 ++_screen;
126
127 // next screen
128 if (_screen < SCREENS)
129 {
130 setPalette(_bg[_screen]->getPalette());
131 _bg[_screen]->setVisible(true);
132 _text[_screen]->setVisible(true);
133 init();
134 }
135 // quit game
136 else
137 {
138 _game->popState();
139 Screen::updateScale(Options::geoscapeScale, Options::geoscapeScale, Options::baseXGeoscape, Options::baseYGeoscape, true);
140 _game->getScreen()->resetDisplay(false);
141 _game->setState(new MainMenuState(_game));
142 _game->setSavedGame(0);
143 }
144}
145
146}

Callers

nothing calls this directly

Calls 8

initFunction · 0.85
resetDisplayMethod · 0.80
getScreenMethod · 0.80
setStateMethod · 0.80
setSavedGameMethod · 0.80
setVisibleMethod · 0.45
getPaletteMethod · 0.45
popStateMethod · 0.45

Tested by

no test coverage detected