diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index e682cac7dc..a3e85d145d 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -17,6 +17,7 @@ ColorP2=1.0,0.5,0.2,1 // orange InitialScreen=ScreenCompany WindowTitle=StepMania DefaultModifiers= +JoinDelaySeconds=0.8 [ModeSwitcher] PrevModeX=-200 diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index 67ee4f8ede..b8f56f6e31 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -26,8 +26,9 @@ #include "SDL_utils.h" #include "RageSounds.h" -#define NEXT_SCREEN THEME->GetMetric(m_sName,"NextScreen") -#define INITIAL_SCREEN THEME->GetMetric("Common","InitialScreen") +#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen") +#define INITIAL_SCREEN THEME->GetMetric ("Common","InitialScreen") +#define JOIN_PAUSE_SECONDS THEME->GetMetricF("Common","JoinPauseSeconds") ScreenAttract::ScreenAttract( CString sName, bool bResetGameState ) : Screen( sName ) @@ -114,7 +115,7 @@ void ScreenAttract::AttractInput( const DeviceInput& DeviceI, const InputEventTy /* We already played the coin sound. Don't play it again. */ if( MenuI.button != MENU_BUTTON_COIN ) SOUND->PlayOnce( THEME->GetPathToS("Common coin") ); - SDL_Delay( 800 ); // do a little pause, like the arcade does + SDL_Delay( (int)(JOIN_PAUSE_SECONDS*1000) ); // do a little pause, like the arcade does LOG->Trace("ScreenAttract::AttractInput: go to ScreenTitleMenu" ); SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); break; diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index e63a509dcb..b4c5ea1a96 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -20,6 +20,7 @@ #include "ScreenManager.h" #include "RageSounds.h" #include "Steps.h" +#include "ScreenAttract.h" const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be same as in ScreenGameplay @@ -182,32 +183,11 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type case MENU_BUTTON_LEFT: case MENU_BUTTON_RIGHT: SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 ); - break; - /* XXX: this is a copy-and-paste from ScreenAttract */ - case MENU_BUTTON_START: - case MENU_BUTTON_BACK: - case MENU_BUTTON_COIN: - switch( PREFSMAN->m_iCoinMode ) - { - case COIN_PAY: - if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit ) - break; // don't fall through - // fall through - case COIN_HOME: - case COIN_FREE: - SOUND->StopMusic(); - /* We already played the it was a coin was inserted. Don't play it again. */ - if( MenuI.button != MENU_BUTTON_COIN ) - SOUND->PlayOnce( THEME->GetPathToS("Common coin") ); - SDL_Delay( 800 ); // do a little pause, like the arcade does - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); - break; - default: - ASSERT(0); - } - break; + return; } } + + ScreenAttract::AttractInput( DeviceI, type, GameI, MenuI, StyleI, m_Out.IsTransitioning() ); } void ScreenJukebox::HandleScreenMessage( const ScreenMessage SM )