summaryrefslogtreecommitdiff
path: root/src/ai
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/ai
parent994bf19aef3dde6c9482434bdc51688f76a937ea (diff)
downloadopenttd-5799402f7a4872d03809838dd7fa01db42bbd282.tar.xz
Codechange: Rename window related DeleteXXX to match new behaviour
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_core.cpp2
-rw-r--r--src/ai/ai_gui.cpp22
2 files changed, 12 insertions, 12 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp
index 95c971af8..d48ce05bf 100644
--- a/src/ai/ai_core.cpp
+++ b/src/ai/ai_core.cpp
@@ -114,7 +114,7 @@
cur_company.Restore();
InvalidateWindowData(WC_AI_DEBUG, 0, -1);
- DeleteWindowById(WC_AI_SETTINGS, company);
+ CloseWindowById(WC_AI_SETTINGS, company);
}
/* static */ void AI::Pause(CompanyID company)
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 1817148f4..c7ae4740e 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -182,7 +182,7 @@ struct AIListWindow : public Window {
}
InvalidateWindowData(WC_GAME_OPTIONS, WN_GAME_OPTIONS_AI);
InvalidateWindowClassesData(WC_AI_SETTINGS);
- DeleteWindowByClass(WC_QUERY_STRING);
+ CloseWindowByClass(WC_QUERY_STRING);
InvalidateWindowClassesData(WC_TEXTFILE);
}
@@ -276,7 +276,7 @@ static WindowDesc _ai_list_desc(
*/
static void ShowAIListWindow(CompanyID slot)
{
- DeleteWindowByClass(WC_AI_LIST);
+ CloseWindowByClass(WC_AI_LIST);
new AIListWindow(&_ai_list_desc, slot);
}
@@ -444,7 +444,7 @@ struct AISettingsWindow : public Window {
if (!this->IsEditableItem(config_item)) return;
if (this->clicked_row != num) {
- DeleteChildWindows(WC_QUERY_STRING);
+ this->CloseChildWindows(WC_QUERY_STRING);
HideDropDownMenu(this);
this->clicked_row = num;
this->clicked_dropdown = false;
@@ -584,7 +584,7 @@ struct AISettingsWindow : public Window {
{
this->RebuildVisibleSettings();
HideDropDownMenu(this);
- DeleteChildWindows(WC_QUERY_STRING);
+ this->CloseChildWindows(WC_QUERY_STRING);
}
private:
@@ -628,8 +628,8 @@ static WindowDesc _ai_settings_desc(
*/
static void ShowAISettingsWindow(CompanyID slot)
{
- DeleteWindowByClass(WC_AI_LIST);
- DeleteWindowByClass(WC_AI_SETTINGS);
+ CloseWindowByClass(WC_AI_LIST);
+ CloseWindowByClass(WC_AI_SETTINGS);
new AISettingsWindow(&_ai_settings_desc, slot);
}
@@ -669,7 +669,7 @@ struct ScriptTextfileWindow : public TextfileWindow {
*/
void ShowScriptTextfileWindow(TextfileType file_type, CompanyID slot)
{
- DeleteWindowById(WC_TEXTFILE, file_type);
+ CloseWindowById(WC_TEXTFILE, file_type);
new ScriptTextfileWindow(file_type, slot);
}
@@ -746,8 +746,8 @@ struct AIConfigWindow : public Window {
void Close() override
{
- DeleteWindowByClass(WC_AI_LIST);
- DeleteWindowByClass(WC_AI_SETTINGS);
+ CloseWindowByClass(WC_AI_LIST);
+ CloseWindowByClass(WC_AI_SETTINGS);
this->Window::Close();
}
@@ -972,7 +972,7 @@ struct AIConfigWindow : public Window {
/** Open the AI config window. */
void ShowAIConfigWindow()
{
- DeleteWindowByClass(WC_GAME_OPTIONS);
+ CloseWindowByClass(WC_GAME_OPTIONS);
new AIConfigWindow();
}
@@ -1264,7 +1264,7 @@ struct AIDebugWindow : public Window {
this->highlight_row = -1; // The highlight of one AI make little sense for another AI.
/* Close AI settings window to prevent confusion */
- DeleteWindowByClass(WC_AI_SETTINGS);
+ CloseWindowByClass(WC_AI_SETTINGS);
this->InvalidateData(-1);