Add WaitForChildrenBeforeTweeningOut
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#define MEMORY_CARD_ICONS THEME->GetMetricB(m_sName,"MemoryCardIcons")
|
#define MEMORY_CARD_ICONS THEME->GetMetricB(m_sName,"MemoryCardIcons")
|
||||||
#define FORCE_TIMER THEME->GetMetricB(m_sName,"ForceTimer")
|
#define FORCE_TIMER THEME->GetMetricB(m_sName,"ForceTimer")
|
||||||
#define STOP_MUSIC_ON_BACK THEME->GetMetricB(m_sName,"StopMusicOnBack")
|
#define STOP_MUSIC_ON_BACK THEME->GetMetricB(m_sName,"StopMusicOnBack")
|
||||||
|
#define WAIT_FOR_CHILDREN_BEFORE_TWEENING_OUT THEME->GetMetricB(m_sName,"WaitForChildrenBeforeTweeningOut")
|
||||||
|
|
||||||
//REGISTER_SCREEN_CLASS( ScreenWithMenuElements );
|
//REGISTER_SCREEN_CLASS( ScreenWithMenuElements );
|
||||||
ScreenWithMenuElements::ScreenWithMenuElements( CString sClassName ) : Screen( sClassName )
|
ScreenWithMenuElements::ScreenWithMenuElements( CString sClassName ) : Screen( sClassName )
|
||||||
@@ -188,19 +189,15 @@ void ScreenWithMenuElements::StartTransitioning( ScreenMessage smSendWhenDone )
|
|||||||
{
|
{
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
|
|
||||||
m_Out.StartTransitioning(smSendWhenDone);
|
if( WAIT_FOR_CHILDREN_BEFORE_TWEENING_OUT )
|
||||||
|
{
|
||||||
/* Ack. If the transition finishes transparent (eg. _options to options),
|
// Time the transition so that it finishes exactly when all actors have
|
||||||
* then we don't want to send the message until all of the *actors* are
|
// finished tweening.
|
||||||
* done tweening. However, if it finishes with something onscreen (most
|
float fSecondsUntilFinished = GetTweenTimeLeft();
|
||||||
* of the rest), we have to send the message immediately after it finishes,
|
float fSecondsUntilBeginOff = max( fSecondsUntilFinished - m_Out.GetLengthSeconds(), 0 );
|
||||||
* or we'll draw a frame without the transition.
|
m_Out.SetHibernate( fSecondsUntilBeginOff );
|
||||||
*
|
}
|
||||||
* For now, I'll make the SMMAX2 option tweening faster. */
|
m_Out.StartTransitioning( smSendWhenDone );
|
||||||
/* This includes all of the actors: */
|
|
||||||
// float TimeUntilFinished = GetTweenTimeLeft();
|
|
||||||
// TimeUntilFinished = max(TimeUntilFinished, m_Out.GetLengthSeconds());
|
|
||||||
// SCREENMAN->PostMessageToTopScreen( smSendWhenDone, TimeUntilFinished );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenWithMenuElements::TweenOffScreen()
|
void ScreenWithMenuElements::TweenOffScreen()
|
||||||
|
|||||||
Reference in New Issue
Block a user