(svn r21116) -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs

This commit is contained in:
planetmaker
2010-11-07 21:46:41 +00:00
parent 09a1d006ba
commit 98de280343
5 changed files with 32 additions and 18 deletions

View File

@@ -701,18 +701,6 @@ static bool RedrawScreen(int32 p1)
return true;
}
/**
* Reinitalise all windows, i.e. construct their windows
* from the begin. For example to show a particular button
* that was previously hidden.
* @param p1 ignored
*/
static bool ReinitWindows(int32 p1)
{
ReInitAllWindows();
return true;
}
/**
* Redraw the smallmap after a colour scheme change.
* @param p1 Callback parameter.
@@ -890,6 +878,21 @@ static bool InvalidateVehTimetableWindow(int32 p1)
return true;
}
/**
* Update any possible saveload window and delete any newgrf dialogue as
* its widget parts might change. Reinit all windows as it allows access to the
* newgrf debug button.
* @param p1 unused.
* @return Always true.
*/
static bool InvalidateNewGRFChangeWindows(int32 p1)
{
InvalidateWindowClassesData(WC_SAVELOAD);
DeleteWindowByClass(WC_GAME_OPTIONS);
ReInitAllWindows();
return true;
}
static bool InvalidateCompanyLiveryWindow(int32 p1)
{
InvalidateWindowClassesData(WC_COMPANY_COLOUR);