remove GenericTweenOn/Off - always play 'On'/'Off' on the Screen
This commit is contained in:
@@ -34,9 +34,7 @@ public:
|
||||
virtual void MenuCoin( const InputEventPlus &input );
|
||||
|
||||
private:
|
||||
virtual bool GenericTweenOn() const { return true; }
|
||||
virtual bool GenericTweenOff() const { return true; }
|
||||
|
||||
|
||||
void UpdateView();
|
||||
|
||||
int m_iViewIndex;
|
||||
|
||||
@@ -52,9 +52,6 @@ public:
|
||||
StageStats *GetStageStats() { return m_pStageStats; }
|
||||
|
||||
protected:
|
||||
virtual bool GenericTweenOn() const { return true; }
|
||||
virtual bool GenericTweenOff() const { return true; }
|
||||
|
||||
void HandleMenuStart();
|
||||
|
||||
bool m_bSummary;
|
||||
|
||||
@@ -133,9 +133,6 @@ public:
|
||||
protected:
|
||||
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; }
|
||||
|
||||
ThemeMetric<RString> PLAYER_TYPE;
|
||||
|
||||
@@ -25,8 +25,6 @@ private:
|
||||
Actor *GetActorWithFocus();
|
||||
void BeforeChangeFocus();
|
||||
void AfterChangeFocus();
|
||||
virtual bool GenericTweenOn() const { return true; }
|
||||
virtual bool GenericTweenOff() const { return true; }
|
||||
void Refresh();
|
||||
|
||||
int m_iCurController;
|
||||
|
||||
@@ -16,9 +16,7 @@ public:
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void Input( const InputEventPlus &input );
|
||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||
virtual bool GenericTweenOn() const { return true; }
|
||||
virtual bool GenericTweenOff() const { return true; }
|
||||
|
||||
|
||||
virtual void MenuStart( const InputEventPlus &input );
|
||||
|
||||
private:
|
||||
|
||||
@@ -17,9 +17,6 @@ public:
|
||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||
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 Backspace( PlayerNumber pn );
|
||||
|
||||
|
||||
@@ -337,21 +337,6 @@ void ScreenOptions::TweenOnScreen()
|
||||
FOREACH( OptionRow*, m_pRows, p )
|
||||
(*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();
|
||||
}
|
||||
|
||||
@@ -361,12 +346,6 @@ void ScreenOptions::TweenOffScreen()
|
||||
|
||||
FOREACH( OptionRow*, m_pRows, p )
|
||||
(*p)->RunCommands( ROW_OFF_COMMAND );
|
||||
|
||||
OFF_COMMAND( m_frameContainer );
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
OFF_COMMAND( m_textExplanation[p] );
|
||||
OFF_COMMAND( m_textExplanationTogether );
|
||||
}
|
||||
|
||||
ScreenOptions::~ScreenOptions()
|
||||
|
||||
@@ -18,25 +18,12 @@ void ScreenOptionsMemoryCard::Init()
|
||||
|
||||
m_textOsMountDir.SetName( "Mount" );
|
||||
m_textOsMountDir.LoadFromFont( THEME->GetPathF(m_sName,"mount") );
|
||||
ActorUtil::LoadAllCommands( m_textOsMountDir, m_sName );
|
||||
this->AddChild( &m_textOsMountDir );
|
||||
|
||||
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()
|
||||
{
|
||||
vector<UsbStorageDevice> aOldDevices = m_CurrentUsbStorageDevices;
|
||||
|
||||
@@ -11,8 +11,6 @@ public:
|
||||
void BeginScreen();
|
||||
|
||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||
virtual void TweenOnScreen();
|
||||
virtual void TweenOffScreen();
|
||||
|
||||
protected:
|
||||
virtual void AfterChangeRow( PlayerNumber pn );
|
||||
|
||||
@@ -45,8 +45,6 @@ public:
|
||||
void HandleScreenMessage( const ScreenMessage SM );
|
||||
|
||||
protected:
|
||||
virtual bool GenericTweenOn() const { return true; }
|
||||
|
||||
struct PageToShow
|
||||
{
|
||||
PageToShow()
|
||||
|
||||
@@ -776,7 +776,6 @@ void ScreenSelectMaster::TweenOnScreen()
|
||||
{
|
||||
m_vsprIcon[c]->PlayCommand( (int(c) == m_iChoice[0])? "GainFocus":"LoseFocus" );
|
||||
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].PlayCommand( "On" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -803,24 +801,15 @@ void ScreenSelectMaster::TweenOnScreen()
|
||||
FOREACH( PlayerNumber, vpns, 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();
|
||||
}
|
||||
|
||||
void ScreenSelectMaster::TweenOffScreen()
|
||||
{
|
||||
this->PlayCommand( "Off" );
|
||||
|
||||
// ScreenSelect::TweenOffScreen();
|
||||
ScreenSelect::TweenOffScreen();
|
||||
|
||||
vector<PlayerNumber> vpns;
|
||||
if( SHARED_SELECTION )
|
||||
|
||||
@@ -21,9 +21,6 @@ public:
|
||||
virtual void MenuBack( const InputEventPlus &input );
|
||||
|
||||
private:
|
||||
virtual bool GenericTweenOn() const { return true; }
|
||||
virtual bool GenericTweenOff() const { return true; }
|
||||
|
||||
BitmapText m_textInputs;
|
||||
|
||||
RageTimer m_timerBackToAutoCycle;
|
||||
|
||||
@@ -75,9 +75,6 @@ protected:
|
||||
virtual void TextEnteredDirectly() { }
|
||||
|
||||
virtual void End( bool bCancelled );
|
||||
virtual bool GenericTweenOn() const { return true; }
|
||||
virtual bool GenericTweenOff() const { return true; }
|
||||
|
||||
private:
|
||||
virtual void MenuStart( const InputEventPlus &input );
|
||||
virtual void MenuBack( const InputEventPlus &input );
|
||||
|
||||
@@ -32,6 +32,7 @@ void ScreenUnlockBrowse::Init()
|
||||
ScreenSelectMaster::Init();
|
||||
|
||||
m_banner.SetName( "Banner" );
|
||||
LOAD_ALL_COMMANDS_AND_SET_XY( m_banner );
|
||||
this->AddChild( &m_banner );
|
||||
|
||||
this->SubscribeToMessage( Message_MenuSelectionChanged );
|
||||
@@ -50,18 +51,6 @@ void ScreenUnlockBrowse::MenuStart( const InputEventPlus &input )
|
||||
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 )
|
||||
{
|
||||
if( msg == Message_MenuSelectionChanged )
|
||||
|
||||
@@ -11,8 +11,6 @@ public:
|
||||
virtual void BeginScreen();
|
||||
virtual void MenuStart( const InputEventPlus &input );
|
||||
|
||||
virtual void TweenOnScreen();
|
||||
virtual void TweenOffScreen();
|
||||
virtual void HandleMessage( const Message &msg );
|
||||
|
||||
protected:
|
||||
|
||||
@@ -115,10 +115,8 @@ void ScreenWithMenuElements::BeginScreen()
|
||||
m_Out.Reset();
|
||||
m_Cancel.Reset();
|
||||
|
||||
if( GenericTweenOn() )
|
||||
this->PlayCommand( "On" );
|
||||
else
|
||||
TweenOnScreen(); // deprecated
|
||||
TweenOnScreen();
|
||||
|
||||
this->SortByDrawOrder();
|
||||
m_In.StartTransitioning( SM_DoneFadingIn );
|
||||
|
||||
@@ -152,24 +150,6 @@ void ScreenWithMenuElements::HandleScreenMessage( const ScreenMessage 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()
|
||||
{
|
||||
SAFE_DELETE( m_MenuTimer );
|
||||
@@ -223,19 +203,7 @@ void ScreenWithMenuElements::ResetTimer()
|
||||
|
||||
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 );
|
||||
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()
|
||||
{
|
||||
if( m_MenuTimer )
|
||||
{
|
||||
m_MenuTimer->SetSeconds( 0 );
|
||||
m_MenuTimer->Stop();
|
||||
OFF_COMMAND( m_MenuTimer );
|
||||
}
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
if( m_MemoryCardDisplay[p] )
|
||||
OFF_COMMAND( m_MemoryCardDisplay[p] );
|
||||
m_sprUnderlay->PlayCommand("Off");
|
||||
m_sprOverlay->PlayCommand("Off");;
|
||||
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.
|
||||
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
void StopTimer();
|
||||
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 TweenOffScreen();
|
||||
|
||||
@@ -38,12 +39,6 @@ protected:
|
||||
virtual void StartPlayingMusic();
|
||||
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;
|
||||
MemoryCardDisplay *m_MemoryCardDisplay[NUM_PLAYERS];
|
||||
MenuTimer *m_MenuTimer;
|
||||
@@ -76,8 +71,6 @@ public:
|
||||
virtual void PushSelf( lua_State *L );
|
||||
|
||||
protected:
|
||||
virtual bool GenericTweenOn() const { return true; }
|
||||
virtual bool GenericTweenOff() const { return true; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user