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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user