From 9d7f804e954a18f3ae365800d4a5046d73704c78 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 25 Mar 2004 22:14:59 +0000 Subject: [PATCH] simplify --- stepmania/src/ScreenDemonstration.cpp | 32 +-------------------------- stepmania/src/ScreenDemonstration.h | 1 - 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 5535688bec..9a8bd56a69 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -89,37 +89,6 @@ void ScreenDemonstration::Update( float fDeltaTime ) ScreenGameplay::Update( fDeltaTime ); } -void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) -{ - //LOG->Trace( "ScreenDemonstration::Input()" ); - - // note: this code really is only needed because when one of these happens - // AttractInput calls SCREENMAN->SetNewScreen(), and we never get another chance - // to reset the volume in that case, and sounds then "vanish" everywhere. - // (should SetNewScreen() cause a SM_LoseFocus message to be sent to the top screen - // before it gets deleted?) - if( MenuI.IsValid() && type == IET_FIRST_PRESS ) - { - switch( MenuI.button ) - { - case MENU_BUTTON_COIN: - case MENU_BUTTON_START: - case MENU_BUTTON_BACK: - if( PREFSMAN->m_iCoinMode == COIN_PAY ) - if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit ) - break; // don't fall through - - SOUND->StopMusic(); - if( !GAMESTATE->IsTimeToPlayAttractSounds() ) - SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); // turn volume back on - - break; - } - } - - ScreenAttract::AttractInput( DeviceI, type, GameI, MenuI, StyleI, m_In.IsTransitioning() || m_Out.IsTransitioning() ); -} - void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM ) { switch( SM ) @@ -136,6 +105,7 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM ) break; case SM_LoseFocus: + LOG->Trace("XXX: lose foc"); SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); // turn volume back on break; diff --git a/stepmania/src/ScreenDemonstration.h b/stepmania/src/ScreenDemonstration.h index d13cff1d11..bfc01e80be 100644 --- a/stepmania/src/ScreenDemonstration.h +++ b/stepmania/src/ScreenDemonstration.h @@ -19,7 +19,6 @@ public: ~ScreenDemonstration(); 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 ); protected: