Codechange: Rename window related DeleteXXX to match new behaviour

This commit is contained in:
glx22
2021-05-17 15:46:38 +02:00
committed by Loïc Guilloux
parent 994bf19aef
commit 5799402f7a
63 changed files with 253 additions and 253 deletions

View File

@@ -137,7 +137,7 @@ struct BaseSetTextfileWindow : public TextfileWindow {
template <class TBaseSet>
void ShowBaseSetTextfileWindow(TextfileType file_type, const TBaseSet* baseset, StringID content_type)
{
DeleteWindowById(WC_TEXTFILE, file_type);
CloseWindowById(WC_TEXTFILE, file_type);
new BaseSetTextfileWindow<TBaseSet>(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_desc(
/** 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);
}