rename back -> cancel because "back" conflicts with "background"
This commit is contained in:
@@ -69,7 +69,7 @@ void ScreenCenterImage::Input( const DeviceInput& DeviceI, const InputEventType
|
||||
return;
|
||||
|
||||
case MENU_BUTTON_BACK:
|
||||
SCREENMAN->PlayBackSound();
|
||||
SCREENMAN->PlayCancelSound();
|
||||
StartTransitioning( SM_GoToPrevScreen );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ void ScreenEditCoursesMenu::MenuStart( PlayerNumber pn )
|
||||
|
||||
void ScreenEditCoursesMenu::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
|
||||
SOUND->StopMusic();
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
||||
|
||||
void ScreenEditMenu::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
|
||||
SOUND->StopMusic();
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ void ScreenEz2SelectMusic::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
SOUND->StopMusic();
|
||||
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ void ScreenEz2SelectPlayer::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
SOUND->StopMusic();
|
||||
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -623,9 +623,9 @@ void ScreenGameplay::Init()
|
||||
m_In.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||
this->AddChild( &m_In );
|
||||
|
||||
m_Back.Load( THEME->GetPathB("Common","back") );
|
||||
m_Back.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); // on top of everything else
|
||||
this->AddChild( &m_Back );
|
||||
m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") );
|
||||
m_Cancel.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); // on top of everything else
|
||||
this->AddChild( &m_Cancel );
|
||||
|
||||
|
||||
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;
|
||||
AbortGiveUp( false );
|
||||
SCREENMAN->PlayBackSound();
|
||||
SCREENMAN->PlayCancelSound();
|
||||
|
||||
m_pSoundMusic->StopPlaying();
|
||||
m_soundAssistTick.StopPlaying(); /* Stop any queued assist ticks. */
|
||||
|
||||
this->ClearMessageQueue();
|
||||
m_Back.StartTransitioning( SM_SaveChangedBeforeGoingBack );
|
||||
m_Cancel.StartTransitioning( SM_SaveChangedBeforeGoingBack );
|
||||
}
|
||||
|
||||
void ScreenGameplay::AbortGiveUp( bool bShowText )
|
||||
@@ -1737,7 +1737,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
||||
if( MenuI.IsValid() &&
|
||||
m_DancingState != STATE_OUTRO &&
|
||||
GAMESTATE->IsHumanPlayer(MenuI.player) &&
|
||||
!m_Back.IsTransitioning() )
|
||||
!m_Cancel.IsTransitioning() )
|
||||
{
|
||||
/* 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
|
||||
|
||||
@@ -139,7 +139,7 @@ protected:
|
||||
Transition m_Win[NUM_PLAYERS];
|
||||
Transition m_Draw;
|
||||
Transition m_In;
|
||||
Transition m_Back;
|
||||
Transition m_Cancel;
|
||||
AutoActor m_Overlay;
|
||||
|
||||
BitmapText m_textSurviveTime; // used in extra stage
|
||||
|
||||
@@ -239,9 +239,9 @@ void ScreenGameplayMultiplayer::Init()
|
||||
m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||
this->AddChild( &m_Out );
|
||||
|
||||
m_Back.Load( THEME->GetPathB("Common","back") );
|
||||
m_Back.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); // on top of everything else
|
||||
this->AddChild( &m_Back );
|
||||
m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") );
|
||||
m_Cancel.SetDrawOrder( DRAW_ORDER_TRANSITIONS ); // on top of everything else
|
||||
this->AddChild( &m_Cancel );
|
||||
|
||||
|
||||
|
||||
@@ -509,8 +509,7 @@ void ScreenGameplayMultiplayer::Input( const DeviceInput& DeviceI, const InputEv
|
||||
if( type == IET_LEVEL_CHANGED )
|
||||
return;
|
||||
|
||||
if( MenuI.IsValid() &&
|
||||
!m_Back.IsTransitioning() )
|
||||
if( MenuI.IsValid() && !m_Cancel.IsTransitioning() )
|
||||
{
|
||||
if( MenuI.button == MENU_BUTTON_BACK &&
|
||||
((!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 */
|
||||
LOG->Trace("Player %i went back", MenuI.player+1);
|
||||
|
||||
SCREENMAN->PlayBackSound();
|
||||
SCREENMAN->PlayCancelSound();
|
||||
/* Hmm. There are a bunch of subtly different ways we can
|
||||
* tween out:
|
||||
* 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();
|
||||
|
||||
this->ClearMessageQueue();
|
||||
m_Back.StartTransitioning( SM_GoToScreenAfterBack );
|
||||
m_Cancel.StartTransitioning( SM_GoToScreenAfterBack );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ protected:
|
||||
|
||||
Transition m_In;
|
||||
Transition m_Out;
|
||||
Transition m_Back;
|
||||
Transition m_Cancel;
|
||||
|
||||
Player m_AutoPlayer;
|
||||
PlayerState m_PlayerState[NUM_MULTI_PLAYERS];
|
||||
|
||||
@@ -70,7 +70,7 @@ void ScreenInstructions::Input( const DeviceInput& DeviceI, const InputEventType
|
||||
|
||||
void ScreenInstructions::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
void ScreenInstructions::MenuStart( PlayerNumber pn )
|
||||
|
||||
@@ -92,7 +92,7 @@ void ScreenManager::ThemeChanged()
|
||||
m_soundCoin.Load( THEME->GetPathS("Common","coin") );
|
||||
m_soundInvalid.Load( THEME->GetPathS("Common","invalid") );
|
||||
m_soundScreenshot.Load( THEME->GetPathS("Common","screenshot") );
|
||||
m_soundBack.Load( THEME->GetPathS("Common","back") );
|
||||
m_soundCancel.Load( THEME->GetPathS("Common","cancel") );
|
||||
|
||||
// reload overlay screens
|
||||
for( unsigned i=0; i<m_OverlayScreens.size(); i++ )
|
||||
@@ -629,11 +629,11 @@ void ScreenManager::PlayScreenshotSound()
|
||||
m_soundScreenshot.Play( &p );
|
||||
}
|
||||
|
||||
void ScreenManager::PlayBackSound()
|
||||
void ScreenManager::PlayCancelSound()
|
||||
{
|
||||
RageSoundParams p;
|
||||
p.m_Volume = PREFSMAN->m_fSoundVolume;
|
||||
m_soundBack.Play( &p );
|
||||
m_soundCancel.Play( &p );
|
||||
}
|
||||
|
||||
void ScreenManager::PlaySharedBackgroundOffCommand()
|
||||
|
||||
@@ -118,14 +118,14 @@ public:
|
||||
void PlayCoinSound();
|
||||
void PlayInvalidSound();
|
||||
void PlayScreenshotSound();
|
||||
void PlayBackSound();
|
||||
void PlayCancelSound();
|
||||
|
||||
private:
|
||||
RageSound m_soundStart;
|
||||
RageSound m_soundCoin;
|
||||
RageSound m_soundInvalid;
|
||||
RageSound m_soundScreenshot;
|
||||
RageSound m_soundBack;
|
||||
RageSound m_soundCancel;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ void ScreenNetRoom::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
TweenOffScreen();
|
||||
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
|
||||
ScreenNetSelectBase::MenuBack( pn );
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ void ScreenNetSelectMusic::MenuBack( PlayerNumber pn )
|
||||
SOUND->StopMusic();
|
||||
TweenOffScreen();
|
||||
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -508,7 +508,7 @@ void ScreenOptions::Input( const DeviceInput& DeviceI, const InputEventType sele
|
||||
{
|
||||
/* Allow input when transitioning in (m_In.IsTransitioning()), but ignore it
|
||||
* 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;
|
||||
|
||||
if( selectType == IET_RELEASE )
|
||||
@@ -755,7 +755,7 @@ void ScreenOptions::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
Screen::MenuBack( pn );
|
||||
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
bool ScreenOptions::IsOnLastRow( PlayerNumber pn ) const
|
||||
|
||||
@@ -267,7 +267,7 @@ void ScreenPackages::MenuBack( PlayerNumber pn )
|
||||
}
|
||||
|
||||
TweenOffScreen();
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
ScreenWithMenuElements::MenuBack( pn );
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ void ScreenSelect::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
SOUND->StopMusic();
|
||||
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -370,7 +370,7 @@ void ScreenSelectCharacter::MenuStart( PlayerNumber pn )
|
||||
|
||||
void ScreenSelectCharacter::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
void ScreenSelectCharacter::TweenOffScreen()
|
||||
|
||||
@@ -238,7 +238,7 @@ void ScreenSelectGroup::MenuStart( PlayerNumber pn )
|
||||
|
||||
void ScreenSelectGroup::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
void ScreenSelectGroup::TweenOffScreen()
|
||||
|
||||
@@ -1237,7 +1237,7 @@ void ScreenSelectMusic::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
SOUND->StopMusic();
|
||||
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
void ScreenSelectMusic::AfterStepsChange( PlayerNumber pn )
|
||||
|
||||
@@ -60,7 +60,7 @@ void ScreenSplash::MenuBack( PlayerNumber pn )
|
||||
{
|
||||
if( IsTransitioning() )
|
||||
return;
|
||||
Back( SM_GoToPrevScreen );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
}
|
||||
|
||||
void ScreenSplash::MenuStart( PlayerNumber pn )
|
||||
|
||||
@@ -52,9 +52,9 @@ void ScreenStage::Init()
|
||||
m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||
this->AddChild( &m_Out );
|
||||
|
||||
m_Back.Load( THEME->GetPathB("Common","back") );
|
||||
m_Back.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||
this->AddChild( &m_Back );
|
||||
m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") );
|
||||
m_Cancel.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||
this->AddChild( &m_Cancel );
|
||||
|
||||
/* Prep the new screen once m_In is complete. */
|
||||
this->PostScreenMessage( SM_PrepScreen, m_Overlay->GetTweenTimeLeft() );
|
||||
@@ -147,15 +147,15 @@ void ScreenStage::Update( float fDeltaTime )
|
||||
|
||||
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;
|
||||
|
||||
if( !ALLOW_BACK )
|
||||
return;
|
||||
|
||||
this->ClearMessageQueue();
|
||||
m_Back.StartTransitioning( SM_GoToPrevScreen );
|
||||
SOUND->PlayOnce( THEME->GetPathS("Common","back") );
|
||||
m_Cancel.StartTransitioning( SM_GoToPrevScreen );
|
||||
SCREENMAN->PlayCancelSound();
|
||||
|
||||
/* 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
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
private:
|
||||
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
|
||||
BitmapText m_SongTitle;
|
||||
BitmapText m_Artist;
|
||||
|
||||
@@ -89,8 +89,8 @@ void ScreenStyleSplash::MenuBack( PlayerNumber pn )
|
||||
if(IsTransitioning())
|
||||
return;
|
||||
this->ClearMessageQueue();
|
||||
Back( SM_GoToPrevScreen );
|
||||
SOUND->PlayOnce( THEME->GetPathS("menu","back") );
|
||||
Cancel( SM_GoToPrevScreen );
|
||||
SOUND->PlayOnce( THEME->GetPathS("menu","cancel") );
|
||||
}
|
||||
|
||||
void ScreenStyleSplash::DrawPrimitives()
|
||||
|
||||
@@ -123,7 +123,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty
|
||||
return;
|
||||
}
|
||||
|
||||
if( m_In.IsTransitioning() || m_Back.IsTransitioning() ) /* not m_Out */
|
||||
if( m_In.IsTransitioning() || m_Cancel.IsTransitioning() ) /* not m_Out */
|
||||
return;
|
||||
|
||||
//
|
||||
|
||||
@@ -106,9 +106,9 @@ void ScreenWithMenuElements::Init()
|
||||
m_Out.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||
this->AddChild( &m_Out );
|
||||
|
||||
m_Back.Load( THEME->GetPathB("Common","back") );
|
||||
m_Back.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||
this->AddChild( &m_Back );
|
||||
m_Cancel.Load( THEME->GetPathB(m_sName,"cancel") );
|
||||
m_Cancel.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||
this->AddChild( &m_Cancel );
|
||||
|
||||
m_In.StartTransitioning();
|
||||
}
|
||||
@@ -187,22 +187,22 @@ void ScreenWithMenuElements::StartTransitioning( ScreenMessage smSendWhenDone )
|
||||
// SCREENMAN->PostMessageToTopScreen( smSendWhenDone, TimeUntilFinished );
|
||||
}
|
||||
|
||||
void ScreenWithMenuElements::Back( ScreenMessage smSendWhenDone )
|
||||
void ScreenWithMenuElements::Cancel( ScreenMessage smSendWhenDone )
|
||||
{
|
||||
if( m_Back.IsTransitioning() )
|
||||
if( m_Cancel.IsTransitioning() )
|
||||
return; // ignore
|
||||
|
||||
if( STOP_MUSIC_ON_BACK )
|
||||
SOUND->StopMusic();
|
||||
|
||||
m_MenuTimer->Stop();
|
||||
m_Back.StartTransitioning( smSendWhenDone );
|
||||
SCREENMAN->PlayBackSound();
|
||||
m_Cancel.StartTransitioning( smSendWhenDone );
|
||||
SCREENMAN->PlayCancelSound();
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
|
||||
void Update( float fDeltaTime );
|
||||
void StartTransitioning( ScreenMessage smSendWhenDone );
|
||||
void Back( ScreenMessage smSendWhenDone );
|
||||
void Cancel( ScreenMessage smSendWhenDone );
|
||||
bool IsTransitioning();
|
||||
bool m_bTimerEnabled;
|
||||
|
||||
@@ -41,7 +41,7 @@ protected:
|
||||
|
||||
Transition m_In;
|
||||
Transition m_Out;
|
||||
Transition m_Back;
|
||||
Transition m_Cancel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user