mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 20:12:42 +00:00
Codechange: enum-class-ify Commands
This commit is contained in:
@@ -108,7 +108,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
|
||||
EndGameWindow(WindowDesc &desc) : EndGameHighScoreBaseWindow(desc)
|
||||
{
|
||||
/* Pause in single-player to have a look at the highscore at your own leisure */
|
||||
if (!_networking) Command<CMD_PAUSE>::Post(PauseMode::Normal, true);
|
||||
if (!_networking) Command<Commands::Pause>::Post(PauseMode::Normal, true);
|
||||
|
||||
this->background_img = SPR_TYCOON_IMG1_BEGIN;
|
||||
|
||||
@@ -136,7 +136,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
|
||||
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
if (!_networking) Command<CMD_PAUSE>::Post(PauseMode::Normal, false); // unpause
|
||||
if (!_networking) Command<Commands::Pause>::Post(PauseMode::Normal, false); // unpause
|
||||
if (_game_mode != GM_MENU && !_exit_game) ShowHighscoreTable(this->window_number, this->rank);
|
||||
this->EndGameHighScoreBaseWindow::Close();
|
||||
}
|
||||
@@ -170,7 +170,7 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
|
||||
{
|
||||
/* pause game to show the chart */
|
||||
this->game_paused_by_player = _pause_mode == PauseMode::Normal;
|
||||
if (!_networking && !this->game_paused_by_player) Command<CMD_PAUSE>::Post(PauseMode::Normal, true);
|
||||
if (!_networking && !this->game_paused_by_player) Command<Commands::Pause>::Post(PauseMode::Normal, true);
|
||||
|
||||
/* Close all always on-top windows to get a clean screen */
|
||||
if (_game_mode != GM_MENU) HideVitalWindows();
|
||||
@@ -185,7 +185,7 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
|
||||
{
|
||||
if (_game_mode != GM_MENU && !_exit_game) ShowVitalWindows();
|
||||
|
||||
if (!_networking && !this->game_paused_by_player) Command<CMD_PAUSE>::Post(PauseMode::Normal, false); // unpause
|
||||
if (!_networking && !this->game_paused_by_player) Command<Commands::Pause>::Post(PauseMode::Normal, false); // unpause
|
||||
|
||||
this->EndGameHighScoreBaseWindow::Close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user