remove GenericTweenOn/Off - always play 'On'/'Off' on the Screen
This commit is contained in:
@@ -34,8 +34,6 @@ public:
|
|||||||
virtual void MenuCoin( const InputEventPlus &input );
|
virtual void MenuCoin( const InputEventPlus &input );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
|
|
||||||
void UpdateView();
|
void UpdateView();
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,6 @@ public:
|
|||||||
StageStats *GetStageStats() { return m_pStageStats; }
|
StageStats *GetStageStats() { return m_pStageStats; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
|
|
||||||
void HandleMenuStart();
|
void HandleMenuStart();
|
||||||
|
|
||||||
bool m_bSummary;
|
bool m_bSummary;
|
||||||
|
|||||||
@@ -133,9 +133,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void UpdateStageStats( MultiPlayer mp ) {}; // overridden for multiplayer
|
virtual void UpdateStageStats( MultiPlayer mp ) {}; // overridden for multiplayer
|
||||||
|
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
|
|
||||||
virtual bool UseSongBackgroundAndForeground() const { return true; }
|
virtual bool UseSongBackgroundAndForeground() const { return true; }
|
||||||
|
|
||||||
ThemeMetric<RString> PLAYER_TYPE;
|
ThemeMetric<RString> PLAYER_TYPE;
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ private:
|
|||||||
Actor *GetActorWithFocus();
|
Actor *GetActorWithFocus();
|
||||||
void BeforeChangeFocus();
|
void BeforeChangeFocus();
|
||||||
void AfterChangeFocus();
|
void AfterChangeFocus();
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
void Refresh();
|
void Refresh();
|
||||||
|
|
||||||
int m_iCurController;
|
int m_iCurController;
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ public:
|
|||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void Input( const InputEventPlus &input );
|
virtual void Input( const InputEventPlus &input );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
|
|
||||||
virtual void MenuStart( const InputEventPlus &input );
|
virtual void MenuStart( const InputEventPlus &input );
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ public:
|
|||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
virtual void Input( const InputEventPlus &input );
|
virtual void Input( const InputEventPlus &input );
|
||||||
|
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
|
|
||||||
bool EnterKey( PlayerNumber pn, wchar_t sLetter );
|
bool EnterKey( PlayerNumber pn, wchar_t sLetter );
|
||||||
bool Backspace( PlayerNumber pn );
|
bool Backspace( PlayerNumber pn );
|
||||||
|
|
||||||
|
|||||||
@@ -337,21 +337,6 @@ void ScreenOptions::TweenOnScreen()
|
|||||||
FOREACH( OptionRow*, m_pRows, p )
|
FOREACH( OptionRow*, m_pRows, p )
|
||||||
(*p)->RunCommands( ROW_ON_COMMAND );
|
(*p)->RunCommands( ROW_ON_COMMAND );
|
||||||
|
|
||||||
ON_COMMAND( m_sprPage );
|
|
||||||
FOREACH_HumanPlayer( p )
|
|
||||||
{
|
|
||||||
ON_COMMAND( m_Cursor[p] );
|
|
||||||
ON_COMMAND( m_sprLineHighlight[p] );
|
|
||||||
}
|
|
||||||
|
|
||||||
ON_COMMAND( m_sprMore );
|
|
||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
|
||||||
if( !m_textExplanation[p].GetName().empty() )
|
|
||||||
ON_COMMAND( m_textExplanation[p] );
|
|
||||||
if( !m_textExplanationTogether.GetName().empty() )
|
|
||||||
ON_COMMAND( m_textExplanationTogether );
|
|
||||||
|
|
||||||
m_frameContainer.SortByDrawOrder();
|
m_frameContainer.SortByDrawOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,12 +346,6 @@ void ScreenOptions::TweenOffScreen()
|
|||||||
|
|
||||||
FOREACH( OptionRow*, m_pRows, p )
|
FOREACH( OptionRow*, m_pRows, p )
|
||||||
(*p)->RunCommands( ROW_OFF_COMMAND );
|
(*p)->RunCommands( ROW_OFF_COMMAND );
|
||||||
|
|
||||||
OFF_COMMAND( m_frameContainer );
|
|
||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
|
||||||
OFF_COMMAND( m_textExplanation[p] );
|
|
||||||
OFF_COMMAND( m_textExplanationTogether );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenOptions::~ScreenOptions()
|
ScreenOptions::~ScreenOptions()
|
||||||
|
|||||||
@@ -18,25 +18,12 @@ void ScreenOptionsMemoryCard::Init()
|
|||||||
|
|
||||||
m_textOsMountDir.SetName( "Mount" );
|
m_textOsMountDir.SetName( "Mount" );
|
||||||
m_textOsMountDir.LoadFromFont( THEME->GetPathF(m_sName,"mount") );
|
m_textOsMountDir.LoadFromFont( THEME->GetPathF(m_sName,"mount") );
|
||||||
|
ActorUtil::LoadAllCommands( m_textOsMountDir, m_sName );
|
||||||
this->AddChild( &m_textOsMountDir );
|
this->AddChild( &m_textOsMountDir );
|
||||||
|
|
||||||
this->SubscribeToMessage( Message_StorageDevicesChanged );
|
this->SubscribeToMessage( Message_StorageDevicesChanged );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptionsMemoryCard::TweenOnScreen()
|
|
||||||
{
|
|
||||||
ON_COMMAND( m_textOsMountDir );
|
|
||||||
|
|
||||||
ScreenOptions::TweenOnScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenOptionsMemoryCard::TweenOffScreen()
|
|
||||||
{
|
|
||||||
OFF_COMMAND( m_textOsMountDir );
|
|
||||||
|
|
||||||
ScreenOptions::TweenOffScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ScreenOptionsMemoryCard::UpdateCurrentUsbStorageDevices()
|
bool ScreenOptionsMemoryCard::UpdateCurrentUsbStorageDevices()
|
||||||
{
|
{
|
||||||
vector<UsbStorageDevice> aOldDevices = m_CurrentUsbStorageDevices;
|
vector<UsbStorageDevice> aOldDevices = m_CurrentUsbStorageDevices;
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ public:
|
|||||||
void BeginScreen();
|
void BeginScreen();
|
||||||
|
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
virtual void TweenOnScreen();
|
|
||||||
virtual void TweenOffScreen();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void AfterChangeRow( PlayerNumber pn );
|
virtual void AfterChangeRow( PlayerNumber pn );
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ public:
|
|||||||
void HandleScreenMessage( const ScreenMessage SM );
|
void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
|
|
||||||
struct PageToShow
|
struct PageToShow
|
||||||
{
|
{
|
||||||
PageToShow()
|
PageToShow()
|
||||||
|
|||||||
@@ -776,7 +776,6 @@ void ScreenSelectMaster::TweenOnScreen()
|
|||||||
{
|
{
|
||||||
m_vsprIcon[c]->PlayCommand( (int(c) == m_iChoice[0])? "GainFocus":"LoseFocus" );
|
m_vsprIcon[c]->PlayCommand( (int(c) == m_iChoice[0])? "GainFocus":"LoseFocus" );
|
||||||
m_vsprIcon[c]->FinishTweening();
|
m_vsprIcon[c]->FinishTweening();
|
||||||
m_vsprIcon[c]->PlayCommand( "On" );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -793,7 +792,6 @@ void ScreenSelectMaster::TweenOnScreen()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_Scroller[*p].SetCurrentAndDestinationItem( (float)m_iChoice[*p] );
|
m_Scroller[*p].SetCurrentAndDestinationItem( (float)m_iChoice[*p] );
|
||||||
m_Scroller[*p].PlayCommand( "On" );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -803,24 +801,15 @@ void ScreenSelectMaster::TweenOnScreen()
|
|||||||
FOREACH( PlayerNumber, vpns, p )
|
FOREACH( PlayerNumber, vpns, p )
|
||||||
{
|
{
|
||||||
m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) );
|
m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) );
|
||||||
m_sprCursor[*p]->PlayCommand( "On" );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FOREACH_ENUM( Page, page )
|
|
||||||
{
|
|
||||||
m_sprExplanation[page]->PlayCommand( "On" );
|
|
||||||
m_sprMore[page]->PlayCommand( "On" );
|
|
||||||
}
|
|
||||||
|
|
||||||
ScreenSelect::TweenOnScreen();
|
ScreenSelect::TweenOnScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelectMaster::TweenOffScreen()
|
void ScreenSelectMaster::TweenOffScreen()
|
||||||
{
|
{
|
||||||
this->PlayCommand( "Off" );
|
ScreenSelect::TweenOffScreen();
|
||||||
|
|
||||||
// ScreenSelect::TweenOffScreen();
|
|
||||||
|
|
||||||
vector<PlayerNumber> vpns;
|
vector<PlayerNumber> vpns;
|
||||||
if( SHARED_SELECTION )
|
if( SHARED_SELECTION )
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ public:
|
|||||||
virtual void MenuBack( const InputEventPlus &input );
|
virtual void MenuBack( const InputEventPlus &input );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
|
|
||||||
BitmapText m_textInputs;
|
BitmapText m_textInputs;
|
||||||
|
|
||||||
RageTimer m_timerBackToAutoCycle;
|
RageTimer m_timerBackToAutoCycle;
|
||||||
|
|||||||
@@ -75,9 +75,6 @@ protected:
|
|||||||
virtual void TextEnteredDirectly() { }
|
virtual void TextEnteredDirectly() { }
|
||||||
|
|
||||||
virtual void End( bool bCancelled );
|
virtual void End( bool bCancelled );
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void MenuStart( const InputEventPlus &input );
|
virtual void MenuStart( const InputEventPlus &input );
|
||||||
virtual void MenuBack( const InputEventPlus &input );
|
virtual void MenuBack( const InputEventPlus &input );
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ void ScreenUnlockBrowse::Init()
|
|||||||
ScreenSelectMaster::Init();
|
ScreenSelectMaster::Init();
|
||||||
|
|
||||||
m_banner.SetName( "Banner" );
|
m_banner.SetName( "Banner" );
|
||||||
|
LOAD_ALL_COMMANDS_AND_SET_XY( m_banner );
|
||||||
this->AddChild( &m_banner );
|
this->AddChild( &m_banner );
|
||||||
|
|
||||||
this->SubscribeToMessage( Message_MenuSelectionChanged );
|
this->SubscribeToMessage( Message_MenuSelectionChanged );
|
||||||
@@ -50,18 +51,6 @@ void ScreenUnlockBrowse::MenuStart( const InputEventPlus &input )
|
|||||||
this->PostScreenMessage( SM_BeginFadingOut, 0 );
|
this->PostScreenMessage( SM_BeginFadingOut, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenUnlockBrowse::TweenOnScreen()
|
|
||||||
{
|
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_banner );
|
|
||||||
ScreenSelectMaster::TweenOnScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenUnlockBrowse::TweenOffScreen()
|
|
||||||
{
|
|
||||||
OFF_COMMAND( m_banner );
|
|
||||||
ScreenSelectMaster::TweenOffScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenUnlockBrowse::HandleMessage( const Message &msg )
|
void ScreenUnlockBrowse::HandleMessage( const Message &msg )
|
||||||
{
|
{
|
||||||
if( msg == Message_MenuSelectionChanged )
|
if( msg == Message_MenuSelectionChanged )
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ public:
|
|||||||
virtual void BeginScreen();
|
virtual void BeginScreen();
|
||||||
virtual void MenuStart( const InputEventPlus &input );
|
virtual void MenuStart( const InputEventPlus &input );
|
||||||
|
|
||||||
virtual void TweenOnScreen();
|
|
||||||
virtual void TweenOffScreen();
|
|
||||||
virtual void HandleMessage( const Message &msg );
|
virtual void HandleMessage( const Message &msg );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -115,10 +115,8 @@ void ScreenWithMenuElements::BeginScreen()
|
|||||||
m_Out.Reset();
|
m_Out.Reset();
|
||||||
m_Cancel.Reset();
|
m_Cancel.Reset();
|
||||||
|
|
||||||
if( GenericTweenOn() )
|
TweenOnScreen();
|
||||||
this->PlayCommand( "On" );
|
|
||||||
else
|
|
||||||
TweenOnScreen(); // deprecated
|
|
||||||
this->SortByDrawOrder();
|
this->SortByDrawOrder();
|
||||||
m_In.StartTransitioning( SM_DoneFadingIn );
|
m_In.StartTransitioning( SM_DoneFadingIn );
|
||||||
|
|
||||||
@@ -152,24 +150,6 @@ void ScreenWithMenuElements::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
Screen::HandleScreenMessage( SM );
|
Screen::HandleScreenMessage( SM );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenWithMenuElements::TweenOnScreen()
|
|
||||||
{
|
|
||||||
if( MEMORY_CARD_ICONS )
|
|
||||||
{
|
|
||||||
FOREACH_PlayerNumber( p )
|
|
||||||
ON_COMMAND( m_MemoryCardDisplay[p] );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( m_MenuTimer )
|
|
||||||
ON_COMMAND( m_MenuTimer );
|
|
||||||
|
|
||||||
m_sprUnderlay->PlayCommand("On");
|
|
||||||
m_sprOverlay->PlayCommand("On");
|
|
||||||
m_In.PlayCommand("On");
|
|
||||||
m_Out.PlayCommand("On");
|
|
||||||
m_Cancel.PlayCommand("On");
|
|
||||||
}
|
|
||||||
|
|
||||||
ScreenWithMenuElements::~ScreenWithMenuElements()
|
ScreenWithMenuElements::~ScreenWithMenuElements()
|
||||||
{
|
{
|
||||||
SAFE_DELETE( m_MenuTimer );
|
SAFE_DELETE( m_MenuTimer );
|
||||||
@@ -222,20 +202,8 @@ void ScreenWithMenuElements::ResetTimer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ScreenWithMenuElements::StartTransitioningScreen( ScreenMessage smSendWhenDone )
|
void ScreenWithMenuElements::StartTransitioningScreen( ScreenMessage smSendWhenDone )
|
||||||
{
|
|
||||||
if( GenericTweenOff() )
|
|
||||||
{
|
|
||||||
this->PlayCommand( "Off" );
|
|
||||||
|
|
||||||
// If we're a stacked screen, then there's someone else between us and the
|
|
||||||
// background, so don't tween it off.
|
|
||||||
if( !SCREENMAN->IsStackedScreen(this) )
|
|
||||||
SCREENMAN->PlaySharedBackgroundOffCommand();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
}
|
|
||||||
|
|
||||||
m_Out.StartTransitioning( smSendWhenDone );
|
m_Out.StartTransitioning( smSendWhenDone );
|
||||||
if( WAIT_FOR_CHILDREN_BEFORE_TWEENING_OUT )
|
if( WAIT_FOR_CHILDREN_BEFORE_TWEENING_OUT )
|
||||||
@@ -248,20 +216,20 @@ void ScreenWithMenuElements::StartTransitioningScreen( ScreenMessage smSendWhenD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScreenWithMenuElements::TweenOnScreen()
|
||||||
|
{
|
||||||
|
this->PlayCommand( "On" );
|
||||||
|
}
|
||||||
|
|
||||||
void ScreenWithMenuElements::TweenOffScreen()
|
void ScreenWithMenuElements::TweenOffScreen()
|
||||||
{
|
{
|
||||||
if( m_MenuTimer )
|
if( m_MenuTimer )
|
||||||
{
|
{
|
||||||
m_MenuTimer->SetSeconds( 0 );
|
m_MenuTimer->SetSeconds( 0 );
|
||||||
m_MenuTimer->Stop();
|
m_MenuTimer->Stop();
|
||||||
OFF_COMMAND( m_MenuTimer );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
this->PlayCommand( "Off" );
|
||||||
if( m_MemoryCardDisplay[p] )
|
|
||||||
OFF_COMMAND( m_MemoryCardDisplay[p] );
|
|
||||||
m_sprUnderlay->PlayCommand("Off");
|
|
||||||
m_sprOverlay->PlayCommand("Off");;
|
|
||||||
|
|
||||||
// If we're a stacked screen, then there's someone else between us and the
|
// If we're a stacked screen, then there's someone else between us and the
|
||||||
// background, so don't tween it off.
|
// background, so don't tween it off.
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public:
|
|||||||
void StopTimer();
|
void StopTimer();
|
||||||
void ResetTimer();
|
void ResetTimer();
|
||||||
|
|
||||||
|
// Sub-classes can hook these and do special actions that won't be triggered automatically by an "On"/"Off" command
|
||||||
virtual void TweenOnScreen();
|
virtual void TweenOnScreen();
|
||||||
virtual void TweenOffScreen();
|
virtual void TweenOffScreen();
|
||||||
|
|
||||||
@@ -38,12 +39,6 @@ protected:
|
|||||||
virtual void StartPlayingMusic();
|
virtual void StartPlayingMusic();
|
||||||
void SetHelpText( RString s );
|
void SetHelpText( RString s );
|
||||||
|
|
||||||
/* If true, BeginScreen() will run OnCommand on the whole screen, and
|
|
||||||
* TweenOnScreen will not be called. (Eventually, all screens should
|
|
||||||
* use this, and this will be removed.) */
|
|
||||||
virtual bool GenericTweenOn() const { return false; }
|
|
||||||
virtual bool GenericTweenOff() const { return false; }
|
|
||||||
|
|
||||||
AutoActor m_sprUnderlay;
|
AutoActor m_sprUnderlay;
|
||||||
MemoryCardDisplay *m_MemoryCardDisplay[NUM_PLAYERS];
|
MemoryCardDisplay *m_MemoryCardDisplay[NUM_PLAYERS];
|
||||||
MenuTimer *m_MenuTimer;
|
MenuTimer *m_MenuTimer;
|
||||||
@@ -76,8 +71,6 @@ public:
|
|||||||
virtual void PushSelf( lua_State *L );
|
virtual void PushSelf( lua_State *L );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool GenericTweenOn() const { return true; }
|
|
||||||
virtual bool GenericTweenOff() const { return true; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user