rename back -> cancel because "back" conflicts with "background"

This commit is contained in:
Chris Danford
2005-03-20 06:14:41 +00:00
parent 1ab61d7dde
commit 48e6cb1a69
27 changed files with 55 additions and 56 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ void ScreenCenterImage::Input( const DeviceInput& DeviceI, const InputEventType
return; return;
case MENU_BUTTON_BACK: case MENU_BUTTON_BACK:
SCREENMAN->PlayBackSound(); SCREENMAN->PlayCancelSound();
StartTransitioning( SM_GoToPrevScreen ); StartTransitioning( SM_GoToPrevScreen );
return; return;
} }
+1 -1
View File
@@ -86,7 +86,7 @@ void ScreenEditCoursesMenu::MenuStart( PlayerNumber pn )
void ScreenEditCoursesMenu::MenuBack( PlayerNumber pn ) void ScreenEditCoursesMenu::MenuBack( PlayerNumber pn )
{ {
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
SOUND->StopMusic(); SOUND->StopMusic();
} }
+1 -1
View File
@@ -279,7 +279,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
void ScreenEditMenu::MenuBack( PlayerNumber pn ) void ScreenEditMenu::MenuBack( PlayerNumber pn )
{ {
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
SOUND->StopMusic(); SOUND->StopMusic();
} }
+1 -1
View File
@@ -408,7 +408,7 @@ void ScreenEz2SelectMusic::MenuBack( PlayerNumber pn )
{ {
SOUND->StopMusic(); SOUND->StopMusic();
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
+1 -1
View File
@@ -174,7 +174,7 @@ void ScreenEz2SelectPlayer::MenuBack( PlayerNumber pn )
{ {
SOUND->StopMusic(); SOUND->StopMusic();
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
+6 -6
View File
@@ -623,9 +623,9 @@ void ScreenGameplay::Init()
m_In.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); m_In.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
this->AddChild( &m_In ); this->AddChild( &m_In );
m_Back.Load( THEME->GetPathB("Common","back") ); m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") );
m_Back.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); // on top of everything else m_Cancel.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); // on top of everything else
this->AddChild( &m_Back ); this->AddChild( &m_Cancel );
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) // only load if we're going to use it if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) // only load if we're going to use it
@@ -1694,13 +1694,13 @@ void ScreenGameplay::BackOutFromGameplay()
{ {
m_DancingState = STATE_OUTRO; m_DancingState = STATE_OUTRO;
AbortGiveUp( false ); AbortGiveUp( false );
SCREENMAN->PlayBackSound(); SCREENMAN->PlayCancelSound();
m_pSoundMusic->StopPlaying(); m_pSoundMusic->StopPlaying();
m_soundAssistTick.StopPlaying(); /* Stop any queued assist ticks. */ m_soundAssistTick.StopPlaying(); /* Stop any queued assist ticks. */
this->ClearMessageQueue(); this->ClearMessageQueue();
m_Back.StartTransitioning( SM_SaveChangedBeforeGoingBack ); m_Cancel.StartTransitioning( SM_SaveChangedBeforeGoingBack );
} }
void ScreenGameplay::AbortGiveUp( bool bShowText ) void ScreenGameplay::AbortGiveUp( bool bShowText )
@@ -1737,7 +1737,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
if( MenuI.IsValid() && if( MenuI.IsValid() &&
m_DancingState != STATE_OUTRO && m_DancingState != STATE_OUTRO &&
GAMESTATE->IsHumanPlayer(MenuI.player) && GAMESTATE->IsHumanPlayer(MenuI.player) &&
!m_Back.IsTransitioning() ) !m_Cancel.IsTransitioning() )
{ {
/* Allow bailing out by holding the START button of all active players. This /* Allow bailing out by holding the START button of all active players. This
* gives a way to "give up" when a back button isn't available. Doing this is * gives a way to "give up" when a back button isn't available. Doing this is
+1 -1
View File
@@ -139,7 +139,7 @@ protected:
Transition m_Win[NUM_PLAYERS]; Transition m_Win[NUM_PLAYERS];
Transition m_Draw; Transition m_Draw;
Transition m_In; Transition m_In;
Transition m_Back; Transition m_Cancel;
AutoActor m_Overlay; AutoActor m_Overlay;
BitmapText m_textSurviveTime; // used in extra stage BitmapText m_textSurviveTime; // used in extra stage
+6 -7
View File
@@ -239,9 +239,9 @@ void ScreenGameplayMultiplayer::Init()
m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
this->AddChild( &m_Out ); this->AddChild( &m_Out );
m_Back.Load( THEME->GetPathB("Common","back") ); m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") );
m_Back.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); // on top of everything else m_Cancel.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); // on top of everything else
this->AddChild( &m_Back ); this->AddChild( &m_Cancel );
@@ -509,8 +509,7 @@ void ScreenGameplayMultiplayer::Input( const DeviceInput& DeviceI, const InputEv
if( type == IET_LEVEL_CHANGED ) if( type == IET_LEVEL_CHANGED )
return; return;
if( MenuI.IsValid() && if( MenuI.IsValid() && !m_Cancel.IsTransitioning() )
!m_Back.IsTransitioning() )
{ {
if( MenuI.button == MENU_BUTTON_BACK && if( MenuI.button == MENU_BUTTON_BACK &&
((!PREFSMAN->m_bDelayedBack && type==IET_FIRST_PRESS) || ((!PREFSMAN->m_bDelayedBack && type==IET_FIRST_PRESS) ||
@@ -520,7 +519,7 @@ void ScreenGameplayMultiplayer::Input( const DeviceInput& DeviceI, const InputEv
/* I had battle mode back out on me mysteriously once. -glenn */ /* I had battle mode back out on me mysteriously once. -glenn */
LOG->Trace("Player %i went back", MenuI.player+1); LOG->Trace("Player %i went back", MenuI.player+1);
SCREENMAN->PlayBackSound(); SCREENMAN->PlayCancelSound();
/* Hmm. There are a bunch of subtly different ways we can /* Hmm. There are a bunch of subtly different ways we can
* tween out: * tween out:
* 1. Keep rendering the song, and keep it moving. This might * 1. Keep rendering the song, and keep it moving. This might
@@ -536,7 +535,7 @@ void ScreenGameplayMultiplayer::Input( const DeviceInput& DeviceI, const InputEv
m_pSoundMusic->StopPlaying(); m_pSoundMusic->StopPlaying();
this->ClearMessageQueue(); this->ClearMessageQueue();
m_Back.StartTransitioning( SM_GoToScreenAfterBack ); m_Cancel.StartTransitioning( SM_GoToScreenAfterBack );
return; return;
} }
} }
+1 -1
View File
@@ -78,7 +78,7 @@ protected:
Transition m_In; Transition m_In;
Transition m_Out; Transition m_Out;
Transition m_Back; Transition m_Cancel;
Player m_AutoPlayer; Player m_AutoPlayer;
PlayerState m_PlayerState[NUM_MULTI_PLAYERS]; PlayerState m_PlayerState[NUM_MULTI_PLAYERS];
+1 -1
View File
@@ -70,7 +70,7 @@ void ScreenInstructions::Input( const DeviceInput& DeviceI, const InputEventType
void ScreenInstructions::MenuBack( PlayerNumber pn ) void ScreenInstructions::MenuBack( PlayerNumber pn )
{ {
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
void ScreenInstructions::MenuStart( PlayerNumber pn ) void ScreenInstructions::MenuStart( PlayerNumber pn )
+3 -3
View File
@@ -92,7 +92,7 @@ void ScreenManager::ThemeChanged()
m_soundCoin.Load( THEME->GetPathS("Common","coin") ); m_soundCoin.Load( THEME->GetPathS("Common","coin") );
m_soundInvalid.Load( THEME->GetPathS("Common","invalid") ); m_soundInvalid.Load( THEME->GetPathS("Common","invalid") );
m_soundScreenshot.Load( THEME->GetPathS("Common","screenshot") ); m_soundScreenshot.Load( THEME->GetPathS("Common","screenshot") );
m_soundBack.Load( THEME->GetPathS("Common","back") ); m_soundCancel.Load( THEME->GetPathS("Common","cancel") );
// reload overlay screens // reload overlay screens
for( unsigned i=0; i<m_OverlayScreens.size(); i++ ) for( unsigned i=0; i<m_OverlayScreens.size(); i++ )
@@ -629,11 +629,11 @@ void ScreenManager::PlayScreenshotSound()
m_soundScreenshot.Play( &p ); m_soundScreenshot.Play( &p );
} }
void ScreenManager::PlayBackSound() void ScreenManager::PlayCancelSound()
{ {
RageSoundParams p; RageSoundParams p;
p.m_Volume = PREFSMAN->m_fSoundVolume; p.m_Volume = PREFSMAN->m_fSoundVolume;
m_soundBack.Play( &p ); m_soundCancel.Play( &p );
} }
void ScreenManager::PlaySharedBackgroundOffCommand() void ScreenManager::PlaySharedBackgroundOffCommand()
+2 -2
View File
@@ -118,14 +118,14 @@ public:
void PlayCoinSound(); void PlayCoinSound();
void PlayInvalidSound(); void PlayInvalidSound();
void PlayScreenshotSound(); void PlayScreenshotSound();
void PlayBackSound(); void PlayCancelSound();
private: private:
RageSound m_soundStart; RageSound m_soundStart;
RageSound m_soundCoin; RageSound m_soundCoin;
RageSound m_soundInvalid; RageSound m_soundInvalid;
RageSound m_soundScreenshot; RageSound m_soundScreenshot;
RageSound m_soundBack; RageSound m_soundCancel;
}; };
+1 -1
View File
@@ -202,7 +202,7 @@ void ScreenNetRoom::MenuBack( PlayerNumber pn )
{ {
TweenOffScreen(); TweenOffScreen();
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
ScreenNetSelectBase::MenuBack( pn ); ScreenNetSelectBase::MenuBack( pn );
} }
+1 -1
View File
@@ -409,7 +409,7 @@ void ScreenNetSelectMusic::MenuBack( PlayerNumber pn )
SOUND->StopMusic(); SOUND->StopMusic();
TweenOffScreen(); TweenOffScreen();
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
+2 -2
View File
@@ -508,7 +508,7 @@ void ScreenOptions::Input( const DeviceInput& DeviceI, const InputEventType sele
{ {
/* Allow input when transitioning in (m_In.IsTransitioning()), but ignore it /* Allow input when transitioning in (m_In.IsTransitioning()), but ignore it
* when we're transitioning out. */ * when we're transitioning out. */
if( m_Back.IsTransitioning() || m_Out.IsTransitioning() || m_fLockInputSecs > 0 ) if( m_Cancel.IsTransitioning() || m_Out.IsTransitioning() || m_fLockInputSecs > 0 )
return; return;
if( selectType == IET_RELEASE ) if( selectType == IET_RELEASE )
@@ -755,7 +755,7 @@ void ScreenOptions::MenuBack( PlayerNumber pn )
{ {
Screen::MenuBack( pn ); Screen::MenuBack( pn );
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
bool ScreenOptions::IsOnLastRow( PlayerNumber pn ) const bool ScreenOptions::IsOnLastRow( PlayerNumber pn ) const
+1 -1
View File
@@ -267,7 +267,7 @@ void ScreenPackages::MenuBack( PlayerNumber pn )
} }
TweenOffScreen(); TweenOffScreen();
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
ScreenWithMenuElements::MenuBack( pn ); ScreenWithMenuElements::MenuBack( pn );
} }
+1 -1
View File
@@ -262,7 +262,7 @@ void ScreenSelect::MenuBack( PlayerNumber pn )
{ {
SOUND->StopMusic(); SOUND->StopMusic();
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
/* /*
+1 -1
View File
@@ -370,7 +370,7 @@ void ScreenSelectCharacter::MenuStart( PlayerNumber pn )
void ScreenSelectCharacter::MenuBack( PlayerNumber pn ) void ScreenSelectCharacter::MenuBack( PlayerNumber pn )
{ {
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
void ScreenSelectCharacter::TweenOffScreen() void ScreenSelectCharacter::TweenOffScreen()
+1 -1
View File
@@ -238,7 +238,7 @@ void ScreenSelectGroup::MenuStart( PlayerNumber pn )
void ScreenSelectGroup::MenuBack( PlayerNumber pn ) void ScreenSelectGroup::MenuBack( PlayerNumber pn )
{ {
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
void ScreenSelectGroup::TweenOffScreen() void ScreenSelectGroup::TweenOffScreen()
+1 -1
View File
@@ -1237,7 +1237,7 @@ void ScreenSelectMusic::MenuBack( PlayerNumber pn )
{ {
SOUND->StopMusic(); SOUND->StopMusic();
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
void ScreenSelectMusic::AfterStepsChange( PlayerNumber pn ) void ScreenSelectMusic::AfterStepsChange( PlayerNumber pn )
+1 -1
View File
@@ -60,7 +60,7 @@ void ScreenSplash::MenuBack( PlayerNumber pn )
{ {
if( IsTransitioning() ) if( IsTransitioning() )
return; return;
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
} }
void ScreenSplash::MenuStart( PlayerNumber pn ) void ScreenSplash::MenuStart( PlayerNumber pn )
+6 -6
View File
@@ -52,9 +52,9 @@ void ScreenStage::Init()
m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
this->AddChild( &m_Out ); this->AddChild( &m_Out );
m_Back.Load( THEME->GetPathB("Common","back") ); m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") );
m_Back.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); m_Cancel.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
this->AddChild( &m_Back ); this->AddChild( &m_Cancel );
/* Prep the new screen once m_In is complete. */ /* Prep the new screen once m_In is complete. */
this->PostScreenMessage( SM_PrepScreen, m_Overlay->GetTweenTimeLeft() ); this->PostScreenMessage( SM_PrepScreen, m_Overlay->GetTweenTimeLeft() );
@@ -147,15 +147,15 @@ void ScreenStage::Update( float fDeltaTime )
void ScreenStage::MenuBack( PlayerNumber pn ) void ScreenStage::MenuBack( PlayerNumber pn )
{ {
if( m_In.IsTransitioning() || m_Out.IsTransitioning() || m_Back.IsTransitioning() ) if( m_In.IsTransitioning() || m_Out.IsTransitioning() || m_Cancel.IsTransitioning() )
return; return;
if( !ALLOW_BACK ) if( !ALLOW_BACK )
return; return;
this->ClearMessageQueue(); this->ClearMessageQueue();
m_Back.StartTransitioning( SM_GoToPrevScreen ); m_Cancel.StartTransitioning( SM_GoToPrevScreen );
SOUND->PlayOnce( THEME->GetPathS("Common","back") ); SCREENMAN->PlayCancelSound();
/* If a Back is buffered while we're prepping the screen (very common), we'll /* If a Back is buffered while we're prepping the screen (very common), we'll
* get it right after the prep finishes. However, the next update will contain * get it right after the prep finishes. However, the next update will contain
+1 -1
View File
@@ -24,7 +24,7 @@ public:
private: private:
ThemeMetric<bool> ALLOW_BACK; ThemeMetric<bool> ALLOW_BACK;
Transition m_In, m_Out, m_Back; Transition m_In, m_Out, m_Cancel;
AutoActor m_Overlay; // overlays all elements except bitmaptexts AutoActor m_Overlay; // overlays all elements except bitmaptexts
BitmapText m_SongTitle; BitmapText m_SongTitle;
BitmapText m_Artist; BitmapText m_Artist;
+2 -2
View File
@@ -89,8 +89,8 @@ void ScreenStyleSplash::MenuBack( PlayerNumber pn )
if(IsTransitioning()) if(IsTransitioning())
return; return;
this->ClearMessageQueue(); this->ClearMessageQueue();
Back( SM_GoToPrevScreen ); Cancel( SM_GoToPrevScreen );
SOUND->PlayOnce( THEME->GetPathS("menu","back") ); SOUND->PlayOnce( THEME->GetPathS("menu","cancel") );
} }
void ScreenStyleSplash::DrawPrimitives() void ScreenStyleSplash::DrawPrimitives()
+1 -1
View File
@@ -123,7 +123,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
return; return;
} }
if( m_In.IsTransitioning() || m_Back.IsTransitioning() ) /* not m_Out */ if( m_In.IsTransitioning() || m_Cancel.IsTransitioning() ) /* not m_Out */
return; return;
// //
+8 -8
View File
@@ -106,9 +106,9 @@ void ScreenWithMenuElements::Init()
m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
this->AddChild( &m_Out ); this->AddChild( &m_Out );
m_Back.Load( THEME->GetPathB("Common","back") ); m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") );
m_Back.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); m_Cancel.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
this->AddChild( &m_Back ); this->AddChild( &m_Cancel );
m_In.StartTransitioning(); m_In.StartTransitioning();
} }
@@ -187,22 +187,22 @@ void ScreenWithMenuElements::StartTransitioning( ScreenMessage smSendWhenDone )
// SCREENMAN->PostMessageToTopScreen( smSendWhenDone, TimeUntilFinished ); // SCREENMAN->PostMessageToTopScreen( smSendWhenDone, TimeUntilFinished );
} }
void ScreenWithMenuElements::Back( ScreenMessage smSendWhenDone ) void ScreenWithMenuElements::Cancel( ScreenMessage smSendWhenDone )
{ {
if( m_Back.IsTransitioning() ) if( m_Cancel.IsTransitioning() )
return; // ignore return; // ignore
if( STOP_MUSIC_ON_BACK ) if( STOP_MUSIC_ON_BACK )
SOUND->StopMusic(); SOUND->StopMusic();
m_MenuTimer->Stop(); m_MenuTimer->Stop();
m_Back.StartTransitioning( smSendWhenDone ); m_Cancel.StartTransitioning( smSendWhenDone );
SCREENMAN->PlayBackSound(); SCREENMAN->PlayCancelSound();
} }
bool ScreenWithMenuElements::IsTransitioning() bool ScreenWithMenuElements::IsTransitioning()
{ {
return m_In.IsTransitioning() || m_Out.IsTransitioning() || m_Back.IsTransitioning(); return m_In.IsTransitioning() || m_Out.IsTransitioning() || m_Cancel.IsTransitioning();
} }
void ScreenWithMenuElements::StopTimer() void ScreenWithMenuElements::StopTimer()
+2 -2
View File
@@ -21,7 +21,7 @@ public:
void Update( float fDeltaTime ); void Update( float fDeltaTime );
void StartTransitioning( ScreenMessage smSendWhenDone ); void StartTransitioning( ScreenMessage smSendWhenDone );
void Back( ScreenMessage smSendWhenDone ); void Cancel( ScreenMessage smSendWhenDone );
bool IsTransitioning(); bool IsTransitioning();
bool m_bTimerEnabled; bool m_bTimerEnabled;
@@ -41,7 +41,7 @@ protected:
Transition m_In; Transition m_In;
Transition m_Out; Transition m_Out;
Transition m_Back; Transition m_Cancel;
}; };
#endif #endif