diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -137,7 +137,7 @@ struct BaseSetTextfileWindow : public Te template void ShowBaseSetTextfileWindow(TextfileType file_type, const TBaseSet* baseset, StringID content_type) { - DeleteWindowById(WC_TEXTFILE, file_type); + CloseWindowById(WC_TEXTFILE, file_type); new BaseSetTextfileWindow(file_type, baseset, content_type); } @@ -174,8 +174,8 @@ struct GameOptionsWindow : Window { void Close() override { - DeleteWindowById(WC_CUSTOM_CURRENCY, 0); - DeleteWindowByClass(WC_TEXTFILE); + CloseWindowById(WC_CUSTOM_CURRENCY, 0); + CloseWindowByClass(WC_TEXTFILE); if (this->reload) _switch_mode = SM_MENU; this->Window::Close(); } @@ -532,7 +532,7 @@ struct GameOptionsWindow : Window { case WID_GO_LANG_DROPDOWN: // Change interface language ReadLanguagePack(&_languages[index]); - DeleteWindowByClass(WC_QUERY_STRING); + CloseWindowByClass(WC_QUERY_STRING); CheckForMissingGlyphs(); ClearAllCachedNames(); UpdateAllVirtCoords(); @@ -744,7 +744,7 @@ static WindowDesc _game_options_desc( /** Open the game options window. */ void ShowGameOptions() { - DeleteWindowByClass(WC_GAME_OPTIONS); + CloseWindowByClass(WC_GAME_OPTIONS); new GameOptionsWindow(&_game_options_desc); } @@ -2479,7 +2479,7 @@ static WindowDesc _settings_selection_de /** Open advanced settings window. */ void ShowGameSettings() { - DeleteWindowByClass(WC_GAME_OPTIONS); + CloseWindowByClass(WC_GAME_OPTIONS); new GameSettingsWindow(&_settings_selection_desc); } @@ -2771,6 +2771,6 @@ static WindowDesc _cust_currency_desc( /** Open custom currency window. */ static void ShowCustCurrency() { - DeleteWindowById(WC_CUSTOM_CURRENCY, 0); + CloseWindowById(WC_CUSTOM_CURRENCY, 0); new CustomCurrencyWindow(&_cust_currency_desc); }