Rename close window functions to match upstream

This commit is contained in:
Jonathan G Rennison
2023-09-15 20:59:08 +01:00
parent ed1b842ad3
commit a18f3274b4
75 changed files with 291 additions and 299 deletions

View File

@@ -608,7 +608,7 @@ bool EngineOverrideManager::ResetToCurrentNewGRFConfig()
*/
void SetupEngines()
{
DeleteWindowByClass(WC_ENGINE_PREVIEW);
CloseWindowByClass(WC_ENGINE_PREVIEW);
_engine_pool.CleanPool();
assert(_engine_mngr.size() >= _engine_mngr.NUM_DEFAULT_ENGINES);
@@ -991,7 +991,7 @@ void EnginesDailyLoop()
if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) {
if (e->preview_company != INVALID_COMPANY) {
if (!--e->preview_wait) {
DeleteWindowById(WC_ENGINE_PREVIEW, i);
CloseWindowById(WC_ENGINE_PREVIEW, i);
e->preview_company = INVALID_COMPANY;
}
} else if (CountBits(e->preview_asked) < MAX_COMPANIES) {
@@ -1169,7 +1169,7 @@ static void NewVehicleAvailable(Engine *e)
if (e->type == VEH_AIRCRAFT) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_AIR);
/* Close pending preview windows */
DeleteWindowById(WC_ENGINE_PREVIEW, index);
CloseWindowById(WC_ENGINE_PREVIEW, index);
}
/** Monthly update of the availability, reliability, and preview offers of the engines. */