diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 791f88cac3..046561a018 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -1,6 +1,5 @@ #include "global.h" #include "Screen.h" -#include "GameState.h" #include "PrefsManager.h" #include "RageSound.h" #include "RageLog.h" @@ -189,16 +188,7 @@ void Screen::Input( const InputEventPlus &input ) void Screen::HandleScreenMessage( const ScreenMessage SM ) { - if( SM == SM_MenuTimer ) - { - FOREACH_HumanPlayer(p) - { - InputEventPlus iep; - iep.pn = p; - MenuStart( iep ); - } - } - else if( SM == SM_GoToNextScreen || SM == SM_GoToPrevScreen ) + if( SM == SM_GoToNextScreen || SM == SM_GoToPrevScreen ) { if( SCREENMAN->IsStackedScreen(this) ) SCREENMAN->PopTopScreen( m_smSendOnPop ); diff --git a/stepmania/src/ScreenWithMenuElements.cpp b/stepmania/src/ScreenWithMenuElements.cpp index e1bea7068e..f4d339e914 100644 --- a/stepmania/src/ScreenWithMenuElements.cpp +++ b/stepmania/src/ScreenWithMenuElements.cpp @@ -10,6 +10,7 @@ #include "ScreenManager.h" #include "GameSoundManager.h" #include "MemoryCardDisplay.h" +#include "InputEventPlus.h" #define TIMER_STEALTH THEME->GetMetricB(m_sName,"TimerStealth") #define STYLE_ICON THEME->GetMetricB(m_sName,"StyleIcon") @@ -156,6 +157,21 @@ void ScreenWithMenuElements::BeginScreen() this->PlayCommand( "FirstUpdate" ); } +void ScreenWithMenuElements::HandleScreenMessage( const ScreenMessage SM ) +{ + if( SM == SM_MenuTimer ) + { + FOREACH_HumanPlayer(p) + { + InputEventPlus iep; + iep.pn = p; + MenuStart( iep ); + } + } + + Screen::HandleScreenMessage( SM ); +} + void ScreenWithMenuElements::TweenOnScreen() { ON_COMMAND( m_autoHeader ); diff --git a/stepmania/src/ScreenWithMenuElements.h b/stepmania/src/ScreenWithMenuElements.h index 2cae2f5496..cedb492439 100644 --- a/stepmania/src/ScreenWithMenuElements.h +++ b/stepmania/src/ScreenWithMenuElements.h @@ -20,6 +20,7 @@ public: virtual void BeginScreen(); virtual ~ScreenWithMenuElements(); + virtual void HandleScreenMessage( const ScreenMessage SM ); void Update( float fDeltaTime ); void StartTransitioningScreen( ScreenMessage smSendWhenDone ); virtual void Cancel( ScreenMessage smSendWhenDone );