summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-05-17 15:46:38 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-05-29 21:08:25 +0200
commit5799402f7a4872d03809838dd7fa01db42bbd282 (patch)
tree6b54e235c14621035b4ec7923edb93980be5f056 /src/settings_gui.cpp
parent994bf19aef3dde6c9482434bdc51688f76a937ea (diff)
downloadopenttd-5799402f7a4872d03809838dd7fa01db42bbd282.tar.xz
Codechange: Rename window related DeleteXXX to match new behaviour
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 6fae298bc..f038617d1 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -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);
}