From 3ffecaa94f0da2903ccd2b11a7ff04547481a975 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 12 Jul 2005 06:01:15 +0000 Subject: [PATCH] de-switch --- stepmania/src/ScreenOptions.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 9d41264d5c..37bc4e6c37 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -499,16 +499,17 @@ void ScreenOptions::Input( const DeviceInput& DeviceI, const InputEventType type void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) { - switch( SM ) + if( SM == SM_MenuTimer ) { - case SM_MenuTimer: this->BeginFadingOut(); - break; - case SM_GoToPrevScreen: + } + else if( SM == SM_GoToPrevScreen ) + { // this->ExportOptions(); // Don't save options if we're going back! this->GoToPrevScreen(); - break; - case SM_GoToNextScreen: + } + else if( SM == SM_GoToNextScreen ) + { for( unsigned r=0; r vpns; @@ -517,8 +518,9 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) this->ExportOptions( r, vpns ); } this->GoToNextScreen(); - break; - case SM_BeginFadingOut: + } + else if( SM == SM_BeginFadingOut ) + { if(IsTransitioning()) return; /* already transitioning */ StartTransitioning( SM_GoToNextScreen ); @@ -526,13 +528,14 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) SCREENMAN->PlayStartSound(); OFF_COMMAND( m_framePage ); - break; - case SM_GainFocus: + } + else if( SM == SM_GainFocus ) + { INPUTFILTER->SetRepeatRate( 0.25f, 12, 0.25f, 12 ); - break; - case SM_LoseFocus: + } + else if( SM == SM_LoseFocus ) + { INPUTFILTER->ResetRepeatRate(); - break; } }