MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / HighScoreWindow

Method HighScoreWindow

src/highscore_gui.cpp:169–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167 bool game_paused_by_player = false; ///< True if the game was paused by the player when the highscore window was opened.
168
169 HighScoreWindow(WindowDesc &desc, int difficulty, int8_t ranking) : EndGameHighScoreBaseWindow(desc)
170 {
171 /* pause game to show the chart */
172 this->game_paused_by_player = _pause_mode == PauseMode::Normal;
173 if (!_networking && !this->game_paused_by_player) Command<CMD_PAUSE>::Post(PauseMode::Normal, true);
174
175 /* Close all always on-top windows to get a clean screen */
176 if (_game_mode != GM_MENU) HideVitalWindows();
177
178 MarkWholeScreenDirty();
179 this->window_number = difficulty; // show highscore chart for difficulty...
180 this->background_img = SPR_HIGHSCORE_CHART_BEGIN; // which background to show
181 this->rank = ranking;
182 }
183
184 void Close([[maybe_unused]] int data = 0) override
185 {

Callers

nothing calls this directly

Calls 2

HideVitalWindowsFunction · 0.85
MarkWholeScreenDirtyFunction · 0.85

Tested by

no test coverage detected