* Shows the next screen in the slideshow * or goes back to the Main Menu. * @param action Pointer to an action. */
| 112 | * @param action Pointer to an action. |
| 113 | */ |
| 114 | void 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 | } |
nothing calls this directly
no test coverage detected