Created GameLoop::ChangeGame analogous to GameLoop::ChangeTheme. Changed ChangeTheme to use the AfterThemeChangeScreen metric instead of a passed in screen name from the theme being changed away from. ChangeGame uses the AfterGameChangeScreen and AfterGameAndThemeChangeScreen metrics to pick the screen to load after the change. New metrics are optional and default to InitialScreen. Changed ScreenManager::ThemeChanged to not duplicate the code in ReloadOverlayScreens. Fixed ScreenManager::IsScreenNameValid to check with HasMetric before using GetMetric. Changed game ConfOption logic to set the preference and work in a similar way to the theme ConfOption. Added THEME:SetTheme lua function.

This commit is contained in:
Kyzentun
2014-08-02 00:38:34 -07:00
committed by Jonathan Payne
parent 5828b2529b
commit 9b08ab5b52
13 changed files with 173 additions and 80 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ static const int MAX_OPTIONS=16;
#define OPT_SAVE_PREFERENCES (1<<0)
#define OPT_APPLY_GRAPHICS (1<<1)
#define OPT_APPLY_THEME (1<<2)
#define OPT_RESET_GAME (1<<3)
#define OPT_CHANGE_GAME (1<<3)
#define OPT_APPLY_SOUND (1<<4)
#define OPT_APPLY_SONG (1<<5)
#define OPT_APPLY_ASPECT_RATIO (1<<6)