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:
@@ -54,10 +54,12 @@ bool ScreenTitleMenu::Input( const InputEventPlus &input )
|
||||
if( input.type == IET_FIRST_PRESS )
|
||||
{
|
||||
// detect codes
|
||||
// Theme changing pad codes are marked as deprecated in _fallback's
|
||||
// metrics.ini, remove them after SM5? -Kyz
|
||||
if( CodeDetector::EnteredCode(input.GameI.controller,CODE_NEXT_THEME) ||
|
||||
CodeDetector::EnteredCode(input.GameI.controller,CODE_NEXT_THEME2) )
|
||||
{
|
||||
GameLoop::ChangeTheme( THEME->GetNextSelectableTheme(), m_sName );
|
||||
GameLoop::ChangeTheme(THEME->GetNextSelectableTheme());
|
||||
bHandled = true;
|
||||
}
|
||||
if( CodeDetector::EnteredCode(input.GameI.controller,CODE_NEXT_ANNOUNCER) ||
|
||||
|
||||
Reference in New Issue
Block a user