diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:50:21 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:50:21 +0000 |
commit | 561b25d0319674716b51d63594e146132d0a33e3 (patch) | |
tree | 9329a875bcf71cf40becc5b8a254db8ddfdcf05e /src/settings_gui.cpp | |
parent | bcbdc3933c4aeff90692a1059375b1f590e7c904 (diff) | |
download | openttd-561b25d0319674716b51d63594e146132d0a33e3.tar.xz |
(svn r23601) -Fix: fix the conflict in window number
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r-- | src/settings_gui.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 5afcd541f..681b0ca58 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -130,7 +130,7 @@ struct GameOptionsWindow : Window { this->opt = &GetGameSettings(); this->reload = false; - this->InitNested(desc); + this->InitNested(desc, WN_GAME_OPTIONS_GAME_OPTIONS); this->OnInvalidateData(0); } @@ -464,7 +464,7 @@ struct GameOptionsWindow : Window { case WID_GO_TOWNNAME_DROPDOWN: // Town names if (_game_mode == GM_MENU || Town::GetNumItems() == 0) { this->opt->game_creation.town_name = index; - SetWindowDirty(WC_GAME_OPTIONS, 0); + SetWindowDirty(WC_GAME_OPTIONS, WN_GAME_OPTIONS_GAME_OPTIONS); } break; @@ -603,7 +603,7 @@ static const WindowDesc _game_options_desc( /** Open the game options window. */ void ShowGameOptions() { - DeleteWindowById(WC_GAME_OPTIONS, 0); + DeleteWindowByClass(WC_GAME_OPTIONS); new GameOptionsWindow(&_game_options_desc); } @@ -624,7 +624,7 @@ public: GameDifficultyWindow(const WindowDesc *desc) : Window() { - this->InitNested(desc); + this->InitNested(desc, WN_GAME_OPTIONS_GAME_DIFFICULTY); /* Setup disabled buttons when creating window * disable all other difficulty buttons during gameplay except for 'custom' */ @@ -879,7 +879,7 @@ static const WindowDesc _game_difficulty_desc( /** Open the game-difficulty window. */ void ShowGameDifficulty() { - DeleteWindowById(WC_GAME_OPTIONS, 0); + DeleteWindowByClass(WC_GAME_OPTIONS); new GameDifficultyWindow(&_game_difficulty_desc); } @@ -1594,7 +1594,7 @@ struct GameSettingsWindow : Window { this->CreateNestedTree(desc); this->vscroll = this->GetScrollbar(WID_GS_SCROLLBAR); - this->FinishInitNested(desc, 0); + this->FinishInitNested(desc, WN_GAME_OPTIONS_GAME_SETTINGS); this->vscroll->SetCount(_settings_main_page.Length()); } @@ -1793,7 +1793,7 @@ static const WindowDesc _settings_selection_desc( /** Open advanced settings window. */ void ShowGameSettings() { - DeleteWindowById(WC_GAME_OPTIONS, 0); + DeleteWindowByClass(WC_GAME_OPTIONS); new GameSettingsWindow(&_settings_selection_desc); } |