diff --git a/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions background.redir b/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions background.redir index 76edcea756..e80b2145da 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions background.redir +++ b/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions background.redir @@ -1 +1 @@ -_shared background \ No newline at end of file +_shared background fade in \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions in.redir b/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions in.redir index d2902773d0..0f6547301b 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions in.redir +++ b/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions in.redir @@ -1 +1 @@ -_fade in \ No newline at end of file +_options to options \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectStyle background.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectStyle background.redir new file mode 100644 index 0000000000..e80b2145da --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectStyle background.redir @@ -0,0 +1 @@ +_shared background fade in \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSongOptions in.redir b/stepmania/Themes/default/BGAnimations/ScreenSongOptions in.redir index d2902773d0..0f6547301b 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenSongOptions in.redir +++ b/stepmania/Themes/default/BGAnimations/ScreenSongOptions in.redir @@ -1 +1 @@ -_fade in \ No newline at end of file +_options to options \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSongOptions out.redir b/stepmania/Themes/default/BGAnimations/ScreenSongOptions out.redir index b8a32d0947..5ffda2b1ba 100644 --- a/stepmania/Themes/default/BGAnimations/ScreenSongOptions out.redir +++ b/stepmania/Themes/default/BGAnimations/ScreenSongOptions out.redir @@ -1 +1 @@ -_fade out \ No newline at end of file +_fade out with sound \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectMusic out.redir b/stepmania/Themes/default/BGAnimations/ScreenStage out.redir similarity index 100% rename from stepmania/Themes/default/BGAnimations/ScreenSelectMusic out.redir rename to stepmania/Themes/default/BGAnimations/ScreenStage out.redir diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 5e40f5a45d..6d65759c6e 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -67,7 +67,7 @@ NextScreen2=ScreenSelectDifficulty NextScreen3=ScreenSelectDifficulty NextScreen4=ScreenSelectDifficulty NextScreen5=ScreenSelectDifficulty -JointPremiumOnCommand=x,550;y,84;xoffset,400;bounceend,0.5;xoffset,-400;glowshift +JointPremiumOnCommand=x,550;y,84;xoffset,400;bounceend,0.5;xoffset,-400;glowshift;effectcolor1,1,1,1,0;effectcolor2,1,1,1,0.3 JointPremiumOffCommand=bouncebegin,0.5;xoffset,400 Icon1OnCommand=x,60;y,84;xoffset,-800;sleep,0.20;decelerate,0.3;xoffset,800 Icon1OffCommand=bouncebegin,0.5;zoomy,0 @@ -84,7 +84,7 @@ IconLoseFocusCommand=stopeffect DisabledColor=0.2,0.2,0.2,1 ExplanationOnCommand=x,480;y,170;xoffset,400;bounceend,0.5;xoffset,-400 ExplanationOffCommand=bouncebegin,0.5;xoffset,400 -WarningOnCommand=x,480;y,280;zoomy,0;decelerate,0.5;zoomy,1;y,400;diffuseshift;effectcolor1,1,1,1,1;effectcolor2,0,0,0,1 +WarningOnCommand=x,480;y,280;zoomy,0;decelerate,0.5;zoomy,1;y,400;diffuseshift;effectcolor1,1,1,1,1;effectcolor2,0.4,0.4,0.4,1 WarningOffCommand=accelerate,0.3;zoomy,0;y,280 InfoOnCommand=x,480;y,280;zoomy,0;bounceend,0.5;zoomy,1 InfoOffCommand=bouncebegin,0.5;zoomy,0 @@ -819,7 +819,7 @@ ShowStats=Display Performance Statistics in the upper right corner::of the scree CoinMode=When set to HOME, options will be shown on the title screen.::When set to PAY the title menu choices are hidden and you must::insert coins before joining in. When set to FREE the title menu::choices are hidden and you can joining in without inserting coins. CoinsPerCredit=The number of coins that must be inserted before a player can join. JointPremium=When set to OFF, game styles that require both sides of the machine::will cost 2 credits. When set to ON game styles that require both sides::of the machine will cost only 1 credit. -SongOptions=Choose whether or not to display the Song Options screen::after the Player Options screen. +SongOptions=When set to HIDE, this option will not allow the player::to enter the Song Options screen. When set to allow ALLOW,::the player can enter the Song Options screen by pressing START. [ScreenGraphicOptions] HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes diff --git a/stepmania/src/MenuElements.cpp b/stepmania/src/MenuElements.cpp index ac8de9818b..a31820ab94 100644 --- a/stepmania/src/MenuElements.cpp +++ b/stepmania/src/MenuElements.cpp @@ -136,6 +136,9 @@ void MenuElements::StartTransitioning( ScreenMessage smSendWhenDone ) void MenuElements::Back( ScreenMessage smSendWhenDone ) { + if( m_Back.IsTransitioning() ) + return; // ignore + m_MenuTimer.StopTimer(); m_Back.StartTransitioning( smSendWhenDone ); m_soundBack.Play(); diff --git a/stepmania/src/MenuTimer.cpp b/stepmania/src/MenuTimer.cpp index 0d11187f12..ea53642449 100644 --- a/stepmania/src/MenuTimer.cpp +++ b/stepmania/src/MenuTimer.cpp @@ -145,6 +145,9 @@ void MenuTimer::SetTimer( int iSeconds ) m_textDigit2.SetZoomX( 1 ); m_textDigit1.SetEffectNone(); m_textDigit2.SetEffectNone(); + + m_textDigit1.SetText( ssprintf("%d", ((int)m_fSecondsLeft+1)/10) ); + m_textDigit2.SetText( ssprintf("%d", ((int)m_fSecondsLeft+1)%10) ); } void MenuTimer::StartTimer() diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 34d960a389..2b80803b8a 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -72,8 +72,6 @@ ScreenDemonstration::ScreenDemonstration() : ScreenJukebox( PrepareForDemonstrat ScreenDemonstration::~ScreenDemonstration() { - GAMESTATE->m_bDemonstrationOrJukebox = false; - GAMESTATE->Reset(); } void ScreenDemonstration::Update( float fDeltaTime ) @@ -115,6 +113,7 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM ) return; case SM_GoToNextScreen: m_soundMusic.Stop(); + GAMESTATE->Reset(); SCREENMAN->SetNewScreen( NEXT_SCREEN ); return; } diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index d5ad47e091..e0d516d0fa 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -208,7 +208,9 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) ////////////////////////// m_Menu.Load( "ScreenEvaluation" ); // FIXME: -// The header needs to be different depending on the result mode. How can we do this elegantly? +// The header needs to be different depending on the result mode. +// We should really split these different ResultModes into separate derived classes +// so that each can have its own Transitions, headers, and such. // THEME->GetPathTo("Graphics",m_ResultMode==RM_ARCADE_SUMMARY?"evaluation summary top edge":"evaluation top edge"), this->AddChild( &m_Menu ); @@ -317,13 +319,13 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) { case RM_COURSE: { - m_sprPercentFrame[p].Load( THEME->GetPathTo("Graphics","evaluation percent frame") ); + m_sprPercentFrame[p].Load( THEME->GetPathTo("Graphics","ScreenEvaluation percent frame") ); m_sprPercentFrame[p].StopAnimating(); m_sprPercentFrame[p].SetState( p ); m_sprPercentFrame[p].SetXY( GRADE_X(p), GRADE_Y ); this->AddChild( &m_sprPercentFrame[p] ); - m_textOniPercentLarge[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") ); + m_textOniPercentLarge[p].LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenEvaluation percent numbers") ); m_textOniPercentLarge[p].EnableShadow( false ); m_textOniPercentLarge[p].SetXY( (PREFSMAN->m_bDancePointsForOni ? DANCE_POINT_X(p) : PERCENT_BASE_X(p) ), PERCENT_BASE_Y ); m_textOniPercentLarge[p].SetHorizAlign( Actor::align_right ); @@ -333,7 +335,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) if(!PREFSMAN->m_bDancePointsForOni) { - m_textOniPercentSmall[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") ); + m_textOniPercentSmall[p].LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenEvaluation percent numbers") ); m_textOniPercentSmall[p].EnableShadow( false ); m_textOniPercentSmall[p].SetZoom( 0.5f ); m_textOniPercentSmall[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y ); @@ -364,13 +366,13 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) } // StageInfo stuff - m_sprCourseFrame[p].Load( THEME->GetPathTo("Graphics","evaluation stage frame 2x1") ); + m_sprCourseFrame[p].Load( THEME->GetPathTo("Graphics","ScreenEvaluation stage frame 2x1") ); m_sprCourseFrame[p].StopAnimating(); m_sprCourseFrame[p].SetState( p ); m_sprCourseFrame[p].SetXY( BONUS_X(p), BONUS_Y ); this->AddChild( &m_sprCourseFrame[p] ); - m_textSongsSurvived[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation stage numbers") ); + m_textSongsSurvived[p].LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenEvaluation stage numbers") ); m_textSongsSurvived[p].EnableShadow( false ); m_textSongsSurvived[p].SetXY( SONGS_SURVIVED_X(p), SONGS_SURVIVED_Y ); m_textSongsSurvived[p].SetText( ssprintf("%02d", stageStats.iSongsPlayed[p]) ); @@ -380,7 +382,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) case RM_ARCADE_STAGE: case RM_ARCADE_SUMMARY: { - m_sprGradeFrame[p].Load( THEME->GetPathTo("Graphics","evaluation grade frame 1x2") ); + m_sprGradeFrame[p].Load( THEME->GetPathTo("Graphics","ScreenEvaluation grade frame 1x2") ); m_sprGradeFrame[p].StopAnimating(); m_sprGradeFrame[p].SetState( p ); m_sprGradeFrame[p].SetXY( GRADE_X(p), GRADE_Y ); @@ -398,7 +400,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) this->AddChild( &m_Grades[p] ); // Bonus info frame - m_sprBonusFrame[p].Load( THEME->GetPathTo("Graphics","evaluation bonus frame 2x1") ); + m_sprBonusFrame[p].Load( THEME->GetPathTo("Graphics","ScreenEvaluation bonus frame 2x1") ); m_sprBonusFrame[p].StopAnimating(); m_sprBonusFrame[p].SetState( p ); m_sprBonusFrame[p].SetXY( BONUS_X(p), BONUS_Y ); @@ -406,7 +408,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) for( int r=0; rGetPathTo("Graphics","evaluation bars possible 1x2") ); + m_sprPossibleBar[p][r].Load( THEME->GetPathTo("Graphics","ScreenEvaluation bars possible 1x2") ); m_sprPossibleBar[p][r].StopAnimating(); m_sprPossibleBar[p][r].SetState( p ); m_sprPossibleBar[p][r].SetHorizAlign( Actor::align_left ); @@ -420,7 +422,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) m_sprPossibleBar[p][r].SetTweenZoomToWidth( BAR_WIDTH*stageStats.fRadarPossible[p][r] ); this->AddChild( &m_sprPossibleBar[p][r] ); - m_sprActualBar[p][r].Load( THEME->GetPathTo("Graphics","evaluation bars actual 1x2") ); + m_sprActualBar[p][r].Load( THEME->GetPathTo("Graphics","ScreenEvaluation bars actual 1x2") ); m_sprActualBar[p][r].StopAnimating(); m_sprActualBar[p][r].SetState( p ); m_sprActualBar[p][r].SetHorizAlign( Actor::align_left ); @@ -442,7 +444,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) if( bNewRecord[p] ) { - m_sprNewRecord[p].Load( THEME->GetPathTo("Graphics","evaluation new record") ); + m_sprNewRecord[p].Load( THEME->GetPathTo("Graphics","ScreenEvaluation new record") ); m_sprNewRecord[p].SetXY( NEW_RECORD_X(p), NEW_RECORD_Y ); m_sprNewRecord[p].SetEffectGlowShift( 2.5f ); this->AddChild( &m_sprNewRecord[p] ); @@ -458,7 +460,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) for( l=0; lGetPathTo("Graphics","evaluation judge labels 1x8") ); + m_sprJudgeLabels[l].Load( THEME->GetPathTo("Graphics","ScreenEvaluation judge labels 1x8") ); m_sprJudgeLabels[l].StopAnimating(); m_sprJudgeLabels[l].SetState( l ); m_sprJudgeLabels[l].SetXY( JUDGE_LABELS_X, JUDGE_Y(l) ); @@ -466,7 +468,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) this->AddChild( &m_sprJudgeLabels[l] ); } - m_sprScoreLabel.Load( THEME->GetPathTo("Graphics","evaluation score labels") ); + m_sprScoreLabel.Load( THEME->GetPathTo("Graphics","ScreenEvaluation score labels") ); m_sprScoreLabel.SetState( m_ResultMode==RM_COURSE ? 1 : 0 ); m_sprScoreLabel.StopAnimating(); m_sprScoreLabel.SetXY( SCORE_LABELS_X, SCORE_Y ); @@ -481,7 +483,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) for( l=0; lGetPathTo("Numbers","evaluation judge numbers") ); + m_textJudgeNumbers[l][p].LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenEvaluation judge numbers") ); m_textJudgeNumbers[l][p].EnableShadow( false ); m_textJudgeNumbers[l][p].SetXY( JUDGE_X(m_ResultMode==RM_COURSE,p,l), JUDGE_Y(l) ); m_textJudgeNumbers[l][p].SetZoom( 1.0f ); @@ -514,12 +516,12 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) if( m_bTryExtraStage ) { - m_sprTryExtraStage.Load( THEME->GetPathTo("Graphics",GAMESTATE->IsExtraStage()?"evaluation try extra stage2":"evaluation try extra stage1") ); + m_sprTryExtraStage.Load( THEME->GetPathTo("Graphics",GAMESTATE->IsExtraStage()?"ScreenEvaluation extra2":"ScreenEvaluation extra1") ); m_sprTryExtraStage.SetXY( TRY_EXTRA_STAGE_X, TRY_EXTRA_STAGE_Y ); m_sprTryExtraStage.SetEffectGlowShift( 2.5f ); this->AddChild( &m_sprTryExtraStage ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","evaluation extra stage") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenEvaluation extra stage") ); } else if( bOneHasNewRecord && ANNOUNCER->HasSoundsFor("evaluation new record") ) { diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index d11c1dcce5..60f04cf017 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -144,8 +144,6 @@ ScreenJukebox::ScreenJukebox( bool bDemonstration ) : ScreenGameplay( PrepareFor ScreenJukebox::~ScreenJukebox() { -// GAMESTATE->m_bDemonstration = false; - //GAMESTATE->Reset(); } void ScreenJukebox::Update( float fDeltaTime ) @@ -167,9 +165,6 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 ) { (int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES; - /*ResetGame(); - You only changed the coin mode.. as with the arcade versions, - the machine should not reset. -- Miryokuteki */ CString sMessage = "Coin Mode: "; switch( PREFSMAN->m_CoinMode ) @@ -236,7 +231,6 @@ void ScreenJukebox::HandleScreenMessage( const ScreenMessage SM ) /* We're actually under Update(), so make sure ScreenGameplay doesn't * continue grading for this call. */ m_soundMusic.StopPlaying(); - SCREENMAN->SetNewScreen( "ScreenJukebox" ); return; } diff --git a/stepmania/src/ScreenMachineOptions.cpp b/stepmania/src/ScreenMachineOptions.cpp index 1e7a0d25d5..7a405aa3d5 100644 --- a/stepmania/src/ScreenMachineOptions.cpp +++ b/stepmania/src/ScreenMachineOptions.cpp @@ -48,7 +48,7 @@ OptionRowData g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = { { "Coin\nMode", 3, {"HOME","PAY","FREE PLAY"} }, { "Coins Per\nCredit", 8, {"1","2","3","4","5","6","7","8"} }, { "Joint\nPremium", 2, {"OFF","ON"} }, - { "Song\nOptions", 2, {"HIDE","SHOW"} }, + { "Song\nOptions", 2, {"HIDE","ALLOW"} }, }; ScreenMachineOptions::ScreenMachineOptions() : diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index a0b88b7288..0f389c78d1 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -41,10 +41,6 @@ #define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenOptions","ColorNotSelected") -const ScreenMessage SM_PlaySample = ScreenMessage(SM_User-4); -const ScreenMessage SM_TweenOffScreen = ScreenMessage(SM_User-7); - - ScreenOptions::ScreenOptions( CString sClassName, bool bEnableTimer ) { LOG->Trace( "ScreenOptions::ScreenOptions()" ); @@ -404,7 +400,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) switch( SM ) { case SM_MenuTimer: - this->SendScreenMessage( SM_TweenOffScreen, 0 ); + this->SendScreenMessage( SM_BeginFadingOut, 0 ); break; case SM_GoToPrevScreen: // this->ExportOptions(); // Don't save options if we're going back! @@ -414,7 +410,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) this->ExportOptions(); this->GoToNextState(); break; - case SM_TweenOffScreen: + case SM_BeginFadingOut: m_Menu.StartTransitioning( SM_GoToNextScreen ); m_SoundStart.Play(); @@ -450,7 +446,7 @@ void ScreenOptions::MenuBack( PlayerNumber pn ) void ScreenOptions::StartGoToNextState() { - this->SendScreenMessage( SM_TweenOffScreen, 0 ); + this->SendScreenMessage( SM_BeginFadingOut, 0 ); } void ScreenOptions::MenuStart( PlayerNumber pn ) @@ -465,11 +461,11 @@ void ScreenOptions::MenuStart( PlayerNumber pn ) if( m_iCurrentRow[pn] != m_iNumOptionRows ) // not on exit MenuDown( pn ); // can't go down any more else if( bAllOnExit ) - this->SendScreenMessage( SM_TweenOffScreen, 0 ); + this->SendScreenMessage( SM_BeginFadingOut, 0 ); } else // !m_bArcadeOptionsNavigation { - this->SendScreenMessage( SM_TweenOffScreen, 0 ); + this->SendScreenMessage( SM_BeginFadingOut, 0 ); } } diff --git a/stepmania/src/ScreenPlayerOptions.cpp b/stepmania/src/ScreenPlayerOptions.cpp index e6076063b5..e185b9f225 100644 --- a/stepmania/src/ScreenPlayerOptions.cpp +++ b/stepmania/src/ScreenPlayerOptions.cpp @@ -60,6 +60,16 @@ ScreenPlayerOptions::ScreenPlayerOptions() : true ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("player options intro") ); + + m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","ScreenPlayerOptions options") ); + m_sprOptionsMessage.StopAnimating(); + m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y ); + m_sprOptionsMessage.SetZoom( 1 ); + m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) ); + //this->AddChild( &m_sprOptionsMessage ); // we have to draw this manually over the top of transitions + + m_bAcceptedChoices = false; + m_bGoToOptions = false; } @@ -187,11 +197,66 @@ void ScreenPlayerOptions::GoToNextState() { if( GAMESTATE->m_bEditing ) SCREENMAN->PopTopScreen(); - else if( PREFSMAN->m_bShowSongOptions == true ) + else if( m_bGoToOptions ) SCREENMAN->SetNewScreen( "ScreenSongOptions" ); else SCREENMAN->SetNewScreen( "ScreenStage" ); } +void ScreenPlayerOptions::Update( float fDelta ) +{ + ScreenOptions::Update( fDelta ); + m_sprOptionsMessage.Update( fDelta ); +} +void ScreenPlayerOptions::DrawPrimitives() +{ + ScreenOptions::DrawPrimitives(); + m_sprOptionsMessage.Draw(); +} + + +void ScreenPlayerOptions::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) +{ + if( type == IET_FIRST_PRESS && + !m_Menu.m_In.IsTransitioning() && + MenuI.IsValid() && + MenuI.button == MENU_BUTTON_START && + PREFSMAN->m_bShowSongOptions ) + { + if( m_bAcceptedChoices && !m_bGoToOptions ) + { + m_bGoToOptions = true; + m_sprOptionsMessage.SetState( 1 ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); + } + } + + ScreenOptions::Input( DeviceI, type, GameI, MenuI, StyleI ); +} + +void ScreenPlayerOptions::HandleScreenMessage( const ScreenMessage SM ) +{ + switch( SM ) + { + case SM_BeginFadingOut: // when the user accepts the page of options + { + m_bAcceptedChoices = true; + + float fShowSeconds = m_Menu.m_Out.GetLengthSeconds(); + + // show "hold START for options" + m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) ); + m_sprOptionsMessage.BeginTweening( 0.15f ); // fade in + m_sprOptionsMessage.SetTweenZoomY( 1 ); + m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,1) ); + m_sprOptionsMessage.BeginTweening( fShowSeconds-0.3f ); // sleep + m_sprOptionsMessage.BeginTweening( 0.15f ); // fade out + m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) ); + m_sprOptionsMessage.SetTweenZoomY( 0 ); + } + break; + } + ScreenOptions::HandleScreenMessage( SM ); +} \ No newline at end of file diff --git a/stepmania/src/ScreenPlayerOptions.h b/stepmania/src/ScreenPlayerOptions.h index 53c6d76864..6dbd5df0a1 100644 --- a/stepmania/src/ScreenPlayerOptions.h +++ b/stepmania/src/ScreenPlayerOptions.h @@ -1,15 +1,15 @@ +#ifndef SCREENPLAYEROPTIONS_H +#define SCREENPLAYEROPTIONS_H /* ----------------------------------------------------------------------------- - File: ScreenPlayerOptions.h + Class: ScreenPlayerOptions Desc: Select a song. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford ----------------------------------------------------------------------------- */ -#ifndef SCREEN_PLAYER_OPTIONS_H -#define SCREEN_PLAYER_OPTIONS_H - #include "ScreenOptions.h" #include "PrefsManager.h" @@ -20,12 +20,21 @@ class ScreenPlayerOptions : public ScreenOptions public: ScreenPlayerOptions(); + virtual void Update( float fDelta ); + virtual void DrawPrimitives(); + virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); + virtual void HandleScreenMessage( const ScreenMessage SM ); + private: void ImportOptions(); void ExportOptions(); void GoToNextState(); void GoToPrevState(); + + bool m_bAcceptedChoices; + bool m_bGoToOptions; + Sprite m_sprOptionsMessage; }; diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 4386d21569..88c6c89b8a 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -725,7 +725,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) m_sprOptionsMessage.BeginTweening( 0.15f ); // fade in m_sprOptionsMessage.SetTweenZoomY( 1 ); m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,1) ); - m_sprOptionsMessage.BeginTweening( fShowSeconds-0.3f ); // sleep + m_sprOptionsMessage.BeginTweening( fShowSeconds-0.35f ); // sleep m_sprOptionsMessage.BeginTweening( 0.15f ); // fade out m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) ); m_sprOptionsMessage.SetTweenZoomY( 0 ); diff --git a/stepmania/src/ScreenSelectMusic.h b/stepmania/src/ScreenSelectMusic.h index 3f8c3829e7..e1464981f6 100644 --- a/stepmania/src/ScreenSelectMusic.h +++ b/stepmania/src/ScreenSelectMusic.h @@ -69,7 +69,6 @@ protected: DifficultyIcon m_DifficultyIcon[NUM_PLAYERS]; Sprite m_AutoGenIcon[NUM_PLAYERS]; GrooveRadar m_GrooveRadar; -// BitmapText m_textPlayerOptions[NUM_PLAYERS]; BitmapText m_textSongOptions; OptionIconRow m_OptionIconRow[NUM_PLAYERS]; Sprite m_sprMeterFrame[NUM_PLAYERS]; diff --git a/stepmania/src/ScreenStyleSplash.cpp b/stepmania/src/ScreenStyleSplash.cpp index 10927ef9f1..c7a172ff88 100644 --- a/stepmania/src/ScreenStyleSplash.cpp +++ b/stepmania/src/ScreenStyleSplash.cpp @@ -29,7 +29,6 @@ const ScreenMessage SM_StartClosing = ScreenMessage(SM_User-8); ScreenStyleSplash::ScreenStyleSplash() { - GAMESTATE->m_bPlayersCanJoin = false; SOUNDMAN->StopMusic(); if(!PREFSMAN->m_bShowDontDie) diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 36dd56b3b2..9f94e83ccb 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -161,8 +161,6 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty if( !MenuI.IsValid() ) return; - - switch( MenuI.button ) { case MENU_BUTTON_UP: @@ -200,29 +198,21 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty if( m_In.IsTransitioning() ) break; /* break if the choice is invalid */ - switch( m_Choice ) + if( m_Choice == CHOICE_JUKEBOX || + m_Choice == CHOICE_EDIT ) { - case CHOICE_GAME_START: - case CHOICE_SELECT_GAME: - case CHOICE_OPTIONS: - #ifdef DEBUG - case CHOICE_SANDBOX: - #endif - case CHOICE_JUKEBOX: - case CHOICE_EDIT: if( SONGMAN->GetNumSongs() == 0 ) { m_soundInvalid.Play(); SCREENMAN->SystemMessage( "No songs are installed" ); - break; + return; } - break; - case CHOICE_EXIT: - ExitGame(); + } + if( m_Choice == CHOICE_EXIT ) + { LOG->Trace("CHOICE_EXIT: shutting down"); + ExitGame(); return; - default: - ASSERT(0); } if( Screen::JoinInput( DeviceI, type, GameI, MenuI, StyleI ) ) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 17b4848148..25af224e9b 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -119,7 +119,6 @@ void ResetGame() GAMESTATE->Reset(); PREFSMAN->ReadGamePrefsFromDisk(); INPUTMAPPER->ReadMappingsFromDisk(); - GAMESTATE->m_bPlayersCanJoin = true; for( int p=0; pWarn( "Metrics file is out of date. Reloading..." ); - MessageBeep( MB_OK ); +// MessageBeep( MB_OK ); SwitchTheme(m_sCurThemeName); // force a reload of the metrics cache } }