Remove SM_AllDoneChoosing. ScreenSelects just send SM_BeginFadingOut when
done. This is much simpler, and fixes concurrent loads starting late.
This commit is contained in:
@@ -239,12 +239,10 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SCREENMAN->ConcurrentlyPrepareScreen( m_sNextScreen );
|
|
||||||
}
|
|
||||||
else if( SM == SM_AllDoneChoosing ) /* It's our turn to tween out. */
|
|
||||||
{
|
|
||||||
if( !IsTransitioning() )
|
if( !IsTransitioning() )
|
||||||
StartTransitioningScreen( SM_GoToNextScreen );
|
StartTransitioningScreen( SM_GoToNextScreen );
|
||||||
|
|
||||||
|
SCREENMAN->ConcurrentlyPrepareScreen( m_sNextScreen );
|
||||||
}
|
}
|
||||||
else if( SM == SM_GoToNextScreen )
|
else if( SM == SM_GoToNextScreen )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,9 +8,6 @@
|
|||||||
#include "CodeDetector.h"
|
#include "CodeDetector.h"
|
||||||
#include "ThemeMetric.h"
|
#include "ThemeMetric.h"
|
||||||
|
|
||||||
// Derived classes must send this when done
|
|
||||||
AutoScreenMessage( SM_AllDoneChoosing )
|
|
||||||
|
|
||||||
class ScreenSelect : public ScreenWithMenuElements
|
class ScreenSelect : public ScreenWithMenuElements
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -159,18 +159,6 @@ void ScreenSelectDifficulty::Update( float fDelta )
|
|||||||
m_fLockInputTime = max( 0, m_fLockInputTime-fDelta );
|
m_fLockInputTime = max( 0, m_fLockInputTime-fDelta );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelectDifficulty::HandleScreenMessage( const ScreenMessage SM )
|
|
||||||
{
|
|
||||||
ScreenSelect::HandleScreenMessage( SM );
|
|
||||||
|
|
||||||
switch( SM )
|
|
||||||
{
|
|
||||||
case SM_BeginFadingOut:
|
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_AllDoneChoosing, 0 ); // notify parent that we're finished
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int ScreenSelectDifficulty::GetSelectionIndex( PlayerNumber pn )
|
int ScreenSelectDifficulty::GetSelectionIndex( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ public:
|
|||||||
// virtual void MenuBack( PlayerNumber pn );
|
// virtual void MenuBack( PlayerNumber pn );
|
||||||
virtual void TweenOffScreen();
|
virtual void TweenOffScreen();
|
||||||
|
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum Page { PAGE_1, PAGE_2, NUM_PAGES };
|
enum Page { PAGE_1, PAGE_2, NUM_PAGES };
|
||||||
|
|
||||||
|
|||||||
@@ -312,8 +312,6 @@ void ScreenSelectMaster::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
{
|
{
|
||||||
/* Backwards compatibility (deprecated). */
|
/* Backwards compatibility (deprecated). */
|
||||||
this->PlayCommand( "TweenOff" );
|
this->PlayCommand( "TweenOff" );
|
||||||
|
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_AllDoneChoosing, 0 ); // notify parent that we're finished
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ void ScreenSelectMode::MenuStart( PlayerNumber pn )
|
|||||||
for(int i=0; i<NUM_PLAYERS; i++)
|
for(int i=0; i<NUM_PLAYERS; i++)
|
||||||
OFF_COMMAND( m_CurChar[i] );
|
OFF_COMMAND( m_CurChar[i] );
|
||||||
|
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_AllDoneChoosing, 0 );
|
SCREENMAN->PostMessageToTopScreen( SM_BeginFadingOut, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScreenSelectMode::GetSelectionIndex( PlayerNumber pn )
|
int ScreenSelectMode::GetSelectionIndex( PlayerNumber pn )
|
||||||
|
|||||||
@@ -205,7 +205,6 @@ void ScreenSelectStyle::MenuStart( PlayerNumber pn )
|
|||||||
|
|
||||||
SCREENMAN->PlayStartSound();
|
SCREENMAN->PlayStartSound();
|
||||||
SCREENMAN->SendMessageToTopScreen( SM_BeginFadingOut );
|
SCREENMAN->SendMessageToTopScreen( SM_BeginFadingOut );
|
||||||
SCREENMAN->SendMessageToTopScreen( SM_AllDoneChoosing );
|
|
||||||
|
|
||||||
const GameCommand& mc = m_aGameCommands[GetSelectionIndex(pn)];
|
const GameCommand& mc = m_aGameCommands[GetSelectionIndex(pn)];
|
||||||
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("%s comment %s",m_sName.c_str(),mc.m_sName.c_str())) );
|
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("%s comment %s",m_sName.c_str(),mc.m_sName.c_str())) );
|
||||||
|
|||||||
Reference in New Issue
Block a user