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

Method screenClick

src/Geoscape/DefeatState.cpp:114–141  ·  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

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

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