From 6e8747d0b6b93fde49702dd9b9995a970c7640ed Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 12 Jul 2005 02:21:28 +0000 Subject: [PATCH] cleanup --- stepmania/src/ScreenBookkeeping.cpp | 11 ----------- stepmania/src/ScreenBookkeeping.h | 1 - stepmania/src/ScreenDemonstration.cpp | 3 --- stepmania/src/ScreenEditMenu.cpp | 11 ++--------- stepmania/src/ScreenJukebox.cpp | 2 -- stepmania/src/ScreenTestInput.cpp | 11 ----------- stepmania/src/ScreenTestInput.h | 1 - stepmania/src/ScreenTestLights.cpp | 4 +--- stepmania/src/ScreenTestSound.cpp | 4 ---- stepmania/src/ScreenTestSound.h | 1 - 10 files changed, 3 insertions(+), 46 deletions(-) diff --git a/stepmania/src/ScreenBookkeeping.cpp b/stepmania/src/ScreenBookkeeping.cpp index e99db1bc3d..adb5386ca6 100644 --- a/stepmania/src/ScreenBookkeeping.cpp +++ b/stepmania/src/ScreenBookkeeping.cpp @@ -70,17 +70,6 @@ void ScreenBookkeeping::Input( const DeviceInput& DeviceI, const InputEventType Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default handler } -void ScreenBookkeeping::HandleScreenMessage( const ScreenMessage SM ) -{ - switch( SM ) - { - case SM_GoToNextScreen: - case SM_GoToPrevScreen: - SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); - break; - } -} - void ScreenBookkeeping::MenuLeft( PlayerNumber pn ) { m_View = (View)(m_View-1); diff --git a/stepmania/src/ScreenBookkeeping.h b/stepmania/src/ScreenBookkeeping.h index eec9bdb464..8668dd7eca 100644 --- a/stepmania/src/ScreenBookkeeping.h +++ b/stepmania/src/ScreenBookkeeping.h @@ -20,7 +20,6 @@ public: virtual void Update( float fDelta ); 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 MenuLeft( PlayerNumber pn ); virtual void MenuRight( PlayerNumber pn ); diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 20a3e868a3..97522eaf46 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -14,7 +14,6 @@ #define SECONDS_TO_SHOW THEME->GetMetricF(m_sName,"SecondsToShow") -#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen") #define ALLOW_STYLE_TYPES THEME->GetMetric (m_sName,"AllowStyleTypes") REGISTER_SCREEN_CLASS( ScreenDemonstration ); @@ -94,8 +93,6 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM ) if( m_pSoundMusic ) m_pSoundMusic->Stop(); SOUNDMAN->SetPrefs( PREFSMAN->GetSoundVolume() ); // turn volume back on - SCREENMAN->SetNewScreen( NEXT_SCREEN ); - return; } ScreenJukebox::HandleScreenMessage( SM ); diff --git a/stepmania/src/ScreenEditMenu.cpp b/stepmania/src/ScreenEditMenu.cpp index c1d9a9af6a..a3f6c1def7 100644 --- a/stepmania/src/ScreenEditMenu.cpp +++ b/stepmania/src/ScreenEditMenu.cpp @@ -16,7 +16,6 @@ #include "ScreenTextEntry.h" #include "ScreenPrompt.h" -#define PREV_SCREEN THEME->GetMetric(m_sName,"PrevScreen") #define EXPLANATION_TEXT( row ) THEME->GetMetric(m_sName,"Explanation"+EditMenuRowToString(row)) AutoScreenMessage( SM_RefreshSelector ) @@ -86,14 +85,6 @@ void ScreenEditMenu::HandleScreenMessage( const ScreenMessage SM ) m_Selector.RefreshAll(); RefreshNumStepsLoadedFromProfile(); } - else if( SM == SM_GoToPrevScreen ) - { - SCREENMAN->SetNewScreen( PREV_SCREEN ); - } - else if( SM == SM_GoToNextScreen ) - { - SCREENMAN->SetNewScreen( "ScreenEdit" ); - } else if( SM == SM_Success ) { LOG->Trace( "Delete successful; deleting steps from memory" ); @@ -111,6 +102,8 @@ void ScreenEditMenu::HandleScreenMessage( const ScreenMessage SM ) StartTransitioning( SM_GoToNextScreen ); } } + + ScreenWithMenuElements::HandleScreenMessage( SM ); } void ScreenEditMenu::MenuUp( PlayerNumber pn ) diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index fb6bca658e..b93d71f679 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -274,8 +274,6 @@ void ScreenJukebox::HandleScreenMessage( const ScreenMessage SM ) { if( m_pSoundMusic ) m_pSoundMusic->Stop(); - SCREENMAN->SetNewScreen( "ScreenJukebox" ); - return; } else if( SM == SM_GoToStartScreen ) { diff --git a/stepmania/src/ScreenTestInput.cpp b/stepmania/src/ScreenTestInput.cpp index 08906280a7..8cddae3867 100644 --- a/stepmania/src/ScreenTestInput.cpp +++ b/stepmania/src/ScreenTestInput.cpp @@ -121,17 +121,6 @@ void ScreenTestInput::Input( const DeviceInput& DeviceI, const InputEventType ty Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default handler } -void ScreenTestInput::HandleScreenMessage( const ScreenMessage SM ) -{ - switch( SM ) - { - case SM_GoToNextScreen: - case SM_GoToPrevScreen: - SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); - break; - } -} - void ScreenTestInput::MenuStart( PlayerNumber pn ) { MenuBack(pn); diff --git a/stepmania/src/ScreenTestInput.h b/stepmania/src/ScreenTestInput.h index 40738685b1..0dd11b7e30 100644 --- a/stepmania/src/ScreenTestInput.h +++ b/stepmania/src/ScreenTestInput.h @@ -16,7 +16,6 @@ public: virtual void Update( float fDelta ); 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 MenuStart( PlayerNumber pn ); virtual void MenuBack( PlayerNumber pn ); diff --git a/stepmania/src/ScreenTestLights.cpp b/stepmania/src/ScreenTestLights.cpp index 8a37db91e3..f5f0142026 100644 --- a/stepmania/src/ScreenTestLights.cpp +++ b/stepmania/src/ScreenTestLights.cpp @@ -100,9 +100,7 @@ void ScreenTestLights::HandleScreenMessage( const ScreenMessage SM ) { switch( SM ) { - case SM_GoToNextScreen: - case SM_GoToPrevScreen: - SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); + case SM_LoseFocus: LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU ); break; } diff --git a/stepmania/src/ScreenTestSound.cpp b/stepmania/src/ScreenTestSound.cpp index 8a5c0e3f62..b2f9c26b90 100644 --- a/stepmania/src/ScreenTestSound.cpp +++ b/stepmania/src/ScreenTestSound.cpp @@ -201,10 +201,6 @@ void ScreenTestSound::Input( const DeviceInput& DeviceI, const InputEventType ty } } -void ScreenTestSound::HandleScreenMessage( const ScreenMessage SM ) -{ - Screen::HandleScreenMessage( SM ); -} /* * (c) 2003 Glenn Maynard diff --git a/stepmania/src/ScreenTestSound.h b/stepmania/src/ScreenTestSound.h index 8cf3cc3ce5..5e81c458cc 100644 --- a/stepmania/src/ScreenTestSound.h +++ b/stepmania/src/ScreenTestSound.h @@ -15,7 +15,6 @@ public: ~ScreenTestSound(); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); - virtual void HandleScreenMessage( const ScreenMessage SM ); void Update(float f); void UpdateText(int n);