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