remove duplicate code
This commit is contained in:
@@ -36,23 +36,15 @@ void ScreenSplash::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
/* The screen load took fScreenLoadSeconds. Move on to the next screen after
|
/* The screen load took fScreenLoadSeconds. Move on to the next screen after
|
||||||
* no less than MINIMUM_DELAY seconds. */
|
* no less than MINIMUM_DELAY seconds. */
|
||||||
this->PostScreenMessage( SM_GoToNextScreen, max( 0, MINIMUM_LOAD_DELAY_SECONDS-fScreenLoadSeconds) );
|
this->PostScreenMessage( SM_GoToNextScreen, max( 0, MINIMUM_LOAD_DELAY_SECONDS-fScreenLoadSeconds) );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if( SM == SM_BeginFadingOut )
|
else if( SM == SM_BeginFadingOut )
|
||||||
{
|
{
|
||||||
StartTransitioning( SM_GoToNextScreen );
|
StartTransitioning( SM_GoToNextScreen );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if( SM == SM_GoToNextScreen )
|
|
||||||
{
|
ScreenWithMenuElements::HandleScreenMessage( SM );
|
||||||
if( SCREENMAN->IsStackedScreen(SCREENMAN->GetTopScreen()) )
|
|
||||||
SCREENMAN->PopTopScreen( SM_None );
|
|
||||||
else
|
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
|
||||||
}
|
|
||||||
else if( SM == SM_GoToPrevScreen )
|
|
||||||
{
|
|
||||||
SCREENMAN->DeletePreparedScreens();
|
|
||||||
SCREENMAN->SetNewScreen( PREV_SCREEN );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSplash::MenuBack( PlayerNumber pn )
|
void ScreenSplash::MenuBack( PlayerNumber pn )
|
||||||
|
|||||||
@@ -72,21 +72,16 @@ void ScreenStage::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
/* The screen load took fScreenLoadSeconds. Move on to the next screen after
|
/* The screen load took fScreenLoadSeconds. Move on to the next screen after
|
||||||
* no less than MINIMUM_DELAY seconds. */
|
* no less than MINIMUM_DELAY seconds. */
|
||||||
this->PostScreenMessage( SM_BeginFadingOut, max( 0, MINIMUM_DELAY-fScreenLoadSeconds) );
|
this->PostScreenMessage( SM_BeginFadingOut, max( 0, MINIMUM_DELAY-fScreenLoadSeconds) );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if( SM == SM_BeginFadingOut )
|
else if( SM == SM_BeginFadingOut )
|
||||||
{
|
{
|
||||||
m_Out.StartTransitioning();
|
m_Out.StartTransitioning();
|
||||||
this->PostScreenMessage( SM_GoToNextScreen, this->GetTweenTimeLeft() );
|
this->PostScreenMessage( SM_GoToNextScreen, this->GetTweenTimeLeft() );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if( SM == SM_GoToNextScreen )
|
|
||||||
{
|
Screen::HandleScreenMessage( SM );
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
|
||||||
}
|
|
||||||
else if( SM == SM_GoToPrevScreen )
|
|
||||||
{
|
|
||||||
SCREENMAN->DeletePreparedScreens();
|
|
||||||
SCREENMAN->SetNewScreen( PREV_SCREEN );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenStage::Update( float fDeltaTime )
|
void ScreenStage::Update( float fDeltaTime )
|
||||||
|
|||||||
Reference in New Issue
Block a user