diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 61e92c83c8..51e5009f2e 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -20,6 +20,9 @@ #include "RageSounds.h" #include "ProfileManager.h" +#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen") +#define PREV_SCREEN THEME->GetMetric (m_sName,"PrevScreen") + Screen::Screen( CString sName ) { SetName( sName ); @@ -145,6 +148,23 @@ void Screen::Input( const DeviceInput& DeviceI, const InputEventType type, const } } +void Screen::HandleScreenMessage( const ScreenMessage SM ) +{ + switch( SM ) + { + case SM_MenuTimer: + FOREACH_HumanPlayer(p) + MenuStart( p ); + break; + case SM_GoToNextScreen: + SCREENMAN->SetNewScreen( NEXT_SCREEN ); + break; + case SM_GoToPrevScreen: + SCREENMAN->SetNewScreen( PREV_SCREEN ); + break; + } +} + bool Screen::ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) { if( type != IET_FIRST_PRESS ) diff --git a/stepmania/src/Screen.h b/stepmania/src/Screen.h index 42601a85f1..dbea0fa64b 100644 --- a/stepmania/src/Screen.h +++ b/stepmania/src/Screen.h @@ -27,7 +27,7 @@ public: virtual void Update( float fDeltaTime ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); - virtual void HandleScreenMessage( const ScreenMessage SM ) {}; + virtual void HandleScreenMessage( const ScreenMessage SM ); void PostScreenMessage( const ScreenMessage SM, const float fDelay ); void ClearMessageQueue();