make the options menu in the course select screen act like it does

in the music select screen
This commit is contained in:
Glenn Maynard
2003-02-17 00:39:10 +00:00
parent 5172339678
commit a6205264db
2 changed files with 17 additions and 5 deletions
+15 -3
View File
@@ -52,6 +52,7 @@
const float TWEEN_TIME = 0.5f; const float TWEEN_TIME = 0.5f;
static const ScreenMessage SM_AllowOptionsMenuRepeat = ScreenMessage(SM_User+1);
@@ -63,6 +64,7 @@ ScreenSelectCourse::ScreenSelectCourse()
m_bMadeChoice = false; m_bMadeChoice = false;
m_bGoToOptions = false; m_bGoToOptions = false;
m_bAllowOptionsMenuRepeat = false;
m_Menu.Load( m_Menu.Load(
THEME->GetPathTo("BGAnimations","select course"), THEME->GetPathTo("BGAnimations","select course"),
@@ -206,18 +208,24 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type,
if( type == IET_RELEASE ) return; // don't care if( type == IET_RELEASE ) return; // don't care
if( m_Menu.IsClosing() ) return; // ignore
if( !GameI.IsValid() ) return; // don't care if( !GameI.IsValid() ) return; // don't care
if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() ) if( m_bMadeChoice && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
{ {
if(m_bGoToOptions) return; /* got it already */
if( !m_bAllowOptionsMenuRepeat &&
(type == IET_SLOW_REPEAT || type == IET_FAST_REPEAT ))
return; /* not allowed yet */
m_bGoToOptions = true; m_bGoToOptions = true;
m_sprOptionsMessage.SetState( 1 ); m_sprOptionsMessage.SetState( 1 );
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") );
return; return;
} }
if( m_Menu.IsClosing() ) return; // ignore
if( m_bMadeChoice ) if( m_bMadeChoice )
return; return;
@@ -238,6 +246,9 @@ void ScreenSelectCourse::HandleScreenMessage( const ScreenMessage SM )
switch( SM ) switch( SM )
{ {
case SM_AllowOptionsMenuRepeat:
m_bAllowOptionsMenuRepeat = true;
break;
case SM_MenuTimer: case SM_MenuTimer:
MenuStart(PLAYER_1); MenuStart(PLAYER_1);
break; break;
@@ -294,6 +305,7 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn )
m_sprOptionsMessage.BeginTweening( 0.25f ); // fade out m_sprOptionsMessage.BeginTweening( 0.25f ); // fade out
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) ); m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) );
m_sprOptionsMessage.SetTweenZoomY( 0 ); m_sprOptionsMessage.SetTweenZoomY( 0 );
this->SendScreenMessage( SM_AllowOptionsMenuRepeat, 0.75f );
m_Menu.TweenOffScreenToBlack( SM_None, false ); m_Menu.TweenOffScreenToBlack( SM_None, false );
+1 -1
View File
@@ -57,7 +57,7 @@ protected:
MusicWheel m_MusicWheel; MusicWheel m_MusicWheel;
bool m_bMadeChoice; bool m_bMadeChoice;
bool m_bGoToOptions; bool m_bGoToOptions, m_bAllowOptionsMenuRepeat;
Sprite m_sprOptionsMessage; Sprite m_sprOptionsMessage;
RageSound m_soundSelect; RageSound m_soundSelect;