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

@@ -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);