options out transition

This commit is contained in:
Glenn Maynard
2004-02-19 03:56:50 +00:00
parent fc72e9479c
commit 3299263db9
2 changed files with 20 additions and 1 deletions
+18 -1
View File
@@ -318,6 +318,11 @@ ScreenSelectMusic::ScreenSelectMusic( CString sClassName ) : Screen( sClassName
m_bgOverlay.LoadFromAniDir( THEME->GetPathToB("ScreenSelectMusic Overlay")); m_bgOverlay.LoadFromAniDir( THEME->GetPathToB("ScreenSelectMusic Overlay"));
this->AddChild( &m_bgOverlay ); this->AddChild( &m_bgOverlay );
m_bgOptionsOut.Load( THEME->GetPathToB(m_sName+" options out") );
// this->AddChild( &m_bgOptionsOut ); // drawn on top
m_bgNoOptionsOut.Load( THEME->GetPathToB(m_sName+" no options out") );
// this->AddChild( &m_bgNoOptionsOut ); // drawn on top
m_soundSelect.Load( THEME->GetPathToS("Common start") ); m_soundSelect.Load( THEME->GetPathToS("Common start") );
m_soundDifficultyEasier.Load( THEME->GetPathToS("ScreenSelectMusic difficulty easier") ); m_soundDifficultyEasier.Load( THEME->GetPathToS("ScreenSelectMusic difficulty easier") );
m_soundDifficultyHarder.Load( THEME->GetPathToS("ScreenSelectMusic difficulty harder") ); m_soundDifficultyHarder.Load( THEME->GetPathToS("ScreenSelectMusic difficulty harder") );
@@ -355,6 +360,8 @@ void ScreenSelectMusic::DrawPrimitives()
Screen::DrawPrimitives(); Screen::DrawPrimitives();
m_Menu.DrawTopLayer(); m_Menu.DrawTopLayer();
m_sprOptionsMessage.Draw(); m_sprOptionsMessage.Draw();
m_bgOptionsOut.Draw();
m_bgNoOptionsOut.Draw();
DISPLAY->CameraPopMatrix(); DISPLAY->CameraPopMatrix();
} }
@@ -646,6 +653,8 @@ void ScreenSelectMusic::TweenScoreOnAndOffAfterChangeSort()
void ScreenSelectMusic::Update( float fDeltaTime ) void ScreenSelectMusic::Update( float fDeltaTime )
{ {
Screen::Update( fDeltaTime ); Screen::Update( fDeltaTime );
m_bgOptionsOut.Update( fDeltaTime );
m_bgNoOptionsOut.Update( fDeltaTime );
m_sprOptionsMessage.Update( fDeltaTime ); m_sprOptionsMessage.Update( fDeltaTime );
@@ -700,6 +709,7 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type,
MenuI.IsValid() && MenuI.IsValid() &&
MenuI.button == MENU_BUTTON_START && MenuI.button == MENU_BUTTON_START &&
type != IET_RELEASE && type != IET_RELEASE &&
m_Menu.IsTransitioning() &&
!GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage() &&
!GAMESTATE->IsExtraStage2() ) !GAMESTATE->IsExtraStage2() )
{ {
@@ -978,6 +988,13 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
* the game state, so just discard them. */ * the game state, so just discard them. */
ClearMessageQueue(); ClearMessageQueue();
break; break;
case SM_BeginFadingOut:
/* XXX: yuck. Later on, maybe this can be done in one BGA with lua ... */
if( m_bGoToOptions )
m_bgOptionsOut.StartTransitioning( SM_GoToNextScreen );
else
m_bgNoOptionsOut.StartTransitioning( SM_GoToNextScreen );
break;
case SM_GoToNextScreen: case SM_GoToNextScreen:
if( m_bGoToOptions ) if( m_bGoToOptions )
{ {
@@ -1105,7 +1122,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn )
this->PostScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f ); this->PostScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f );
} }
m_Menu.StartTransitioning( SM_GoToNextScreen ); m_Menu.StartTransitioning( SM_BeginFadingOut );
} }
if( GAMESTATE->IsExtraStage() && PREFSMAN->m_bPickExtraStage ) if( GAMESTATE->IsExtraStage() && PREFSMAN->m_bPickExtraStage )
+2
View File
@@ -114,6 +114,8 @@ protected:
bool m_bAllowOptionsMenu, m_bAllowOptionsMenuRepeat; bool m_bAllowOptionsMenu, m_bAllowOptionsMenuRepeat;
BGAnimation m_bgOverlay; BGAnimation m_bgOverlay;
Transition m_bgOptionsOut;
Transition m_bgNoOptionsOut;
RageSound m_soundSelect; RageSound m_soundSelect;
RageSound m_soundDifficultyEasier; RageSound m_soundDifficultyEasier;