Use Init() for all screens, so we can set state before the base class
members are loaded--they'll see resets, score finalization, etc. It also results in smaller code, due to a g++ bug that causes constructors to be emitted several times.
This commit is contained in:
@@ -24,17 +24,20 @@
|
|||||||
REGISTER_SCREEN_CLASS( ScreenAttract );
|
REGISTER_SCREEN_CLASS( ScreenAttract );
|
||||||
ScreenAttract::ScreenAttract( CString sName, bool bResetGameState ) : Screen( sName )
|
ScreenAttract::ScreenAttract( CString sName, bool bResetGameState ) : Screen( sName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenAttract::ScreenAttract(%s)", m_sName.c_str() );
|
if( bResetGameState )
|
||||||
|
GAMESTATE->Reset();
|
||||||
|
|
||||||
// increment times through attract count
|
// increment times through attract count
|
||||||
if( m_sName == INITIAL_SCREEN.GetValue() )
|
if( m_sName == INITIAL_SCREEN.GetValue() )
|
||||||
GAMESTATE->m_iNumTimesThroughAttract++;
|
GAMESTATE->m_iNumTimesThroughAttract++;
|
||||||
|
}
|
||||||
|
|
||||||
if( bResetGameState )
|
void ScreenAttract::Init()
|
||||||
GAMESTATE->Reset();
|
{
|
||||||
|
LOG->Trace( "ScreenAttract::ScreenAttract(%s)", m_sName.c_str() );
|
||||||
|
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
// We have to do initialization in the first update because this->GetElementName() won't
|
|
||||||
// work until the object has been fully constructed.
|
|
||||||
m_In.Load( THEME->GetPathB(m_sName,"in") );
|
m_In.Load( THEME->GetPathB(m_sName,"in") );
|
||||||
m_In.StartTransitioning();
|
m_In.StartTransitioning();
|
||||||
m_In.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
m_In.SetDrawOrder( DRAW_ORDER_TRANSITIONS );
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class ScreenAttract : public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenAttract( CString sName, bool bResetGameState=true );
|
ScreenAttract( CString sName, bool bResetGameState=true );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenAttract();
|
virtual ~ScreenAttract();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ REGISTER_SCREEN_CLASS( ScreenBookkeeping );
|
|||||||
ScreenBookkeeping::ScreenBookkeeping( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
ScreenBookkeeping::ScreenBookkeeping( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenBookkeeping::ScreenBookkeeping()" );
|
LOG->Trace( "ScreenBookkeeping::ScreenBookkeeping()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenBookkeeping::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
m_textTitle.LoadFromFont( THEME->GetPathF("Common","title") );
|
m_textTitle.LoadFromFont( THEME->GetPathF("Common","title") );
|
||||||
m_textTitle.SetText( "header" );
|
m_textTitle.SetText( "header" );
|
||||||
m_textTitle.SetXY( SCREEN_CENTER_X, 60 );
|
m_textTitle.SetXY( SCREEN_CENTER_X, 60 );
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class ScreenBookkeeping : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenBookkeeping( CString sName );
|
ScreenBookkeeping( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenBookkeeping();
|
virtual ~ScreenBookkeeping();
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|||||||
@@ -489,6 +489,11 @@ REGISTER_SCREEN_CLASS( ScreenEdit );
|
|||||||
ScreenEdit::ScreenEdit( CString sName ) : Screen( sName )
|
ScreenEdit::ScreenEdit( CString sName ) : Screen( sName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenEdit::ScreenEdit()" );
|
LOG->Trace( "ScreenEdit::ScreenEdit()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenEdit::Init()
|
||||||
|
{
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
InitEditMappings();
|
InitEditMappings();
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ class ScreenEdit : public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenEdit( CString sName );
|
ScreenEdit( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenEdit();
|
virtual ~ScreenEdit();
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|||||||
@@ -191,9 +191,13 @@ ScreenEnding::ScreenEnding( CString sClassName ) : ScreenAttract( sClassName, fa
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Update final profile stats before we load them for display below.
|
// Update final profile stats before we load them for display.
|
||||||
GAMESTATE->FinishStage();
|
GAMESTATE->FinishStage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenEnding::Init()
|
||||||
|
{
|
||||||
|
ScreenAttract::Init();
|
||||||
|
|
||||||
vector<Song*> arraySongs;
|
vector<Song*> arraySongs;
|
||||||
SONGMAN->GetSongs( arraySongs );
|
SONGMAN->GetSongs( arraySongs );
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class ScreenEnding : public ScreenAttract
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenEnding( CString sName );
|
ScreenEnding( CString sName );
|
||||||
|
virtual void Init();
|
||||||
~ScreenEnding();
|
~ScreenEnding();
|
||||||
|
|
||||||
void Update( float fDeltaTime );
|
void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -90,11 +90,6 @@ REGISTER_SCREEN_CLASS( ScreenEvaluation );
|
|||||||
ScreenEvaluation::ScreenEvaluation( CString sClassName ) : ScreenWithMenuElements(sClassName)
|
ScreenEvaluation::ScreenEvaluation( CString sClassName ) : ScreenWithMenuElements(sClassName)
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenEvaluation::ScreenEvaluation" );
|
LOG->Trace( "ScreenEvaluation::ScreenEvaluation" );
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenEvaluation::Init()
|
|
||||||
{
|
|
||||||
Screen::Init();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// debugging
|
// debugging
|
||||||
@@ -178,8 +173,14 @@ void ScreenEvaluation::Init()
|
|||||||
|
|
||||||
STATSMAN->m_vPlayedStageStats.clear();
|
STATSMAN->m_vPlayedStageStats.clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LOG->Trace( "ScreenEvaluation::ScreenEvaluation()" );
|
|
||||||
|
void ScreenEvaluation::Init()
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenEvaluation::Init()" );
|
||||||
|
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
|
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class ScreenEvaluation : public ScreenWithMenuElements
|
|||||||
public:
|
public:
|
||||||
enum Type { stage, summary, course };
|
enum Type { stage, summary, course };
|
||||||
ScreenEvaluation( CString sClassName );
|
ScreenEvaluation( CString sClassName );
|
||||||
|
virtual void Init();
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
@@ -49,7 +50,6 @@ public:
|
|||||||
virtual void MenuStart( PlayerNumber pn );
|
virtual void MenuStart( PlayerNumber pn );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void Init();
|
|
||||||
void CommitScores(
|
void CommitScores(
|
||||||
const StageStats &stageStats,
|
const StageStats &stageStats,
|
||||||
int iPersonalHighScoreIndexOut[NUM_PLAYERS],
|
int iPersonalHighScoreIndexOut[NUM_PLAYERS],
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic( CString sName ) : ScreenWithMenuElem
|
|||||||
{
|
{
|
||||||
/* Finish any previous stage. It's OK to call this when we havn't played a stage yet. */
|
/* Finish any previous stage. It's OK to call this when we havn't played a stage yet. */
|
||||||
GAMESTATE->FinishStage();
|
GAMESTATE->FinishStage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenEz2SelectMusic::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
i_SkipAheadOffset = 0;
|
i_SkipAheadOffset = 0;
|
||||||
LastInputTime = 0;
|
LastInputTime = 0;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class ScreenEz2SelectMusic : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenEz2SelectMusic( CString sName );
|
ScreenEz2SelectMusic( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -45,6 +45,12 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer( CString sName ) : ScreenWithMenuEl
|
|||||||
GAMESTATE->m_bSideIsJoined[p] = false;
|
GAMESTATE->m_bSideIsJoined[p] = false;
|
||||||
|
|
||||||
LOG->Trace( "ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()" );
|
LOG->Trace( "ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScreenEz2SelectPlayer::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ class ScreenEz2SelectPlayer : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenEz2SelectPlayer( CString sName );
|
ScreenEz2SelectPlayer( CString sName );
|
||||||
virtual ~ScreenEz2SelectPlayer(); // Destructor
|
virtual void Init();
|
||||||
|
virtual ~ScreenEz2SelectPlayer();
|
||||||
|
|
||||||
/* Public Function Prototypes */
|
/* Public Function Prototypes */
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -74,6 +74,11 @@ ScreenHowToPlay::ScreenHowToPlay( CString sName ) : ScreenAttract( sName )
|
|||||||
m_pLifeMeterBar = NULL;
|
m_pLifeMeterBar = NULL;
|
||||||
m_pmCharacter = NULL;
|
m_pmCharacter = NULL;
|
||||||
m_pmDancePad = NULL;
|
m_pmDancePad = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenHowToPlay::Init()
|
||||||
|
{
|
||||||
|
ScreenAttract::Init();
|
||||||
|
|
||||||
m_In.Load( THEME->GetPathB("ScreenHowToPlay","in") );
|
m_In.Load( THEME->GetPathB("ScreenHowToPlay","in") );
|
||||||
m_In.StartTransitioning();
|
m_In.StartTransitioning();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class ScreenHowToPlay : public ScreenAttract
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenHowToPlay( CString sName );
|
ScreenHowToPlay( CString sName );
|
||||||
|
virtual void Init();
|
||||||
~ScreenHowToPlay();
|
~ScreenHowToPlay();
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ ScreenInstructions::ScreenInstructions( CString sName ) : ScreenWithMenuElements
|
|||||||
|
|
||||||
if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID )
|
if( GAMESTATE->m_PlayMode == PLAY_MODE_INVALID )
|
||||||
RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before showing ScreenInstructions." );
|
RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before showing ScreenInstructions." );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenInstructions::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
m_sprHowToPlay.Load( THEME->GetPathG(m_sName,PlayModeToString(GAMESTATE->m_PlayMode)) );
|
m_sprHowToPlay.Load( THEME->GetPathG(m_sName,PlayModeToString(GAMESTATE->m_PlayMode)) );
|
||||||
m_sprHowToPlay.SetXY( SCREEN_CENTER_X, SCREEN_CENTER_Y );
|
m_sprHowToPlay.SetXY( SCREEN_CENTER_X, SCREEN_CENTER_Y );
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class ScreenInstructions : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenInstructions( CString sName );
|
ScreenInstructions( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,12 @@
|
|||||||
REGISTER_SCREEN_CLASS( ScreenLogo );
|
REGISTER_SCREEN_CLASS( ScreenLogo );
|
||||||
ScreenLogo::ScreenLogo( CString sName ) : ScreenAttract( sName )
|
ScreenLogo::ScreenLogo( CString sName ) : ScreenAttract( sName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenLogo::Init()
|
||||||
|
{
|
||||||
|
ScreenAttract::Init();
|
||||||
|
|
||||||
m_sprLogo.SetName( "Logo" );
|
m_sprLogo.SetName( "Logo" );
|
||||||
m_sprLogo.Load( THEME->GetPathG("ScreenLogo",GAMESTATE->GetCurrentGame()->m_szName) );
|
m_sprLogo.Load( THEME->GetPathG("ScreenLogo",GAMESTATE->GetCurrentGame()->m_szName) );
|
||||||
SET_XY_AND_ON_COMMAND( m_sprLogo );
|
SET_XY_AND_ON_COMMAND( m_sprLogo );
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class ScreenLogo : public ScreenAttract
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenLogo( CString sName );
|
ScreenLogo( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Sprite m_sprLogo;
|
Sprite m_sprLogo;
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ REGISTER_SCREEN_CLASS( ScreenMapControllers );
|
|||||||
ScreenMapControllers::ScreenMapControllers( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
ScreenMapControllers::ScreenMapControllers( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenMapControllers::ScreenMapControllers()" );
|
LOG->Trace( "ScreenMapControllers::ScreenMapControllers()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenMapControllers::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
CStringArray strArray;
|
CStringArray strArray;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class ScreenMapControllers : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenMapControllers( CString sName );
|
ScreenMapControllers( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenMapControllers();
|
virtual ~ScreenMapControllers();
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ const unsigned NUM_CREDIT_LINES = sizeof(CREDIT_LINES) / sizeof(CString);
|
|||||||
REGISTER_SCREEN_CLASS( ScreenMusicScroll );
|
REGISTER_SCREEN_CLASS( ScreenMusicScroll );
|
||||||
ScreenMusicScroll::ScreenMusicScroll( CString sClassName ) : ScreenAttract( sClassName )
|
ScreenMusicScroll::ScreenMusicScroll( CString sClassName ) : ScreenAttract( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenMusicScroll::Init()
|
||||||
|
{
|
||||||
|
ScreenAttract::Init();
|
||||||
|
|
||||||
vector<Song*> arraySongs;
|
vector<Song*> arraySongs;
|
||||||
SONGMAN->GetSongs( arraySongs );
|
SONGMAN->GetSongs( arraySongs );
|
||||||
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class ScreenMusicScroll : public ScreenAttract
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenMusicScroll( CString sName );
|
ScreenMusicScroll( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenMusicScroll();
|
virtual ~ScreenMusicScroll();
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -173,6 +173,11 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional( CString sClassName ) : S
|
|||||||
MAX_RANKING_NAME_LENGTH.Load( m_sName, "MaxRankingNameLength" );
|
MAX_RANKING_NAME_LENGTH.Load( m_sName, "MaxRankingNameLength" );
|
||||||
FEAT_INTERVAL.Load( m_sName, "FeatInterval" );
|
FEAT_INTERVAL.Load( m_sName, "FeatInterval" );
|
||||||
KEYBOARD_LETTERS.Load( m_sName, "KeyboardLetters" );
|
KEYBOARD_LETTERS.Load( m_sName, "KeyboardLetters" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenNameEntryTraditional::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
// Find out if players deserve to enter their name
|
// Find out if players deserve to enter their name
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ class ScreenNameEntryTraditional : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenNameEntryTraditional( CString sName );
|
ScreenNameEntryTraditional( CString sName );
|
||||||
~ScreenNameEntryTraditional();
|
virtual void Init();
|
||||||
|
virtual ~ScreenNameEntryTraditional();
|
||||||
|
|
||||||
void Update( float fDeltaTime );
|
void Update( float fDeltaTime );
|
||||||
void DrawPrimitives();
|
void DrawPrimitives();
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ const ScreenMessage SM_GotEval = ScreenMessage(SM_User+6);
|
|||||||
REGISTER_SCREEN_CLASS( ScreenNetEvaluation );
|
REGISTER_SCREEN_CLASS( ScreenNetEvaluation );
|
||||||
ScreenNetEvaluation::ScreenNetEvaluation (const CString & sClassName) : ScreenEvaluation( sClassName )
|
ScreenNetEvaluation::ScreenNetEvaluation (const CString & sClassName) : ScreenEvaluation( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenNetEvaluation::Init()
|
||||||
|
{
|
||||||
|
ScreenEvaluation::Init();
|
||||||
|
|
||||||
m_bHasStats = false;
|
m_bHasStats = false;
|
||||||
m_pActivePlayer = PLAYER_1;
|
m_pActivePlayer = PLAYER_1;
|
||||||
m_iCurrentPlayer = 0;
|
m_iCurrentPlayer = 0;
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ class ScreenNetEvaluation: public ScreenEvaluation
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenNetEvaluation (const CString& sClassName);
|
ScreenNetEvaluation (const CString& sClassName);
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void MenuLeft( PlayerNumber pn, const InputEventType type );
|
virtual void MenuLeft( PlayerNumber pn, const InputEventType type );
|
||||||
virtual void MenuUp( PlayerNumber pn, const InputEventType type );
|
virtual void MenuUp( PlayerNumber pn, const InputEventType type );
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ REGISTER_SCREEN_CLASS( ScreenNetRoom );
|
|||||||
ScreenNetRoom::ScreenNetRoom( const CString& sName ) : ScreenNetSelectBase( sName )
|
ScreenNetRoom::ScreenNetRoom( const CString& sName ) : ScreenNetSelectBase( sName )
|
||||||
{
|
{
|
||||||
GAMESTATE->FinishStage();
|
GAMESTATE->FinishStage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenNetRoom::Init()
|
||||||
|
{
|
||||||
|
ScreenNetSelectBase::Init();
|
||||||
|
|
||||||
m_soundChangeSel.Load( THEME->GetPathS("ScreenNetRoom","change sel"));
|
m_soundChangeSel.Load( THEME->GetPathS("ScreenNetRoom","change sel"));
|
||||||
|
|
||||||
m_iRoomPlace = 0;
|
m_iRoomPlace = 0;
|
||||||
@@ -77,7 +83,6 @@ ScreenNetRoom::ScreenNetRoom( const CString& sName ) : ScreenNetSelectBase( sNam
|
|||||||
this->AddChild( &m_sprCreateRoom );
|
this->AddChild( &m_sprCreateRoom );
|
||||||
|
|
||||||
NSMAN->ReportNSSOnOff(7);
|
NSMAN->ReportNSSOnOff(7);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenNetRoom::Input( const DeviceInput& DeviceI, const InputEventType type,
|
void ScreenNetRoom::Input( const DeviceInput& DeviceI, const InputEventType type,
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class ScreenNetRoom : public ScreenNetSelectBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenNetRoom( const CString& sName );
|
ScreenNetRoom( const CString& sName );
|
||||||
|
virtual void Init();
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type,
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type,
|
||||||
const GameInput& GameI, const MenuInput& MenuI,
|
const GameInput& GameI, const MenuInput& MenuI,
|
||||||
const StyleInput& StyleI );
|
const StyleInput& StyleI );
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ const ScreenMessage SM_SMOnlinePack = ScreenMessage(SM_User+8); //Unused, but sh
|
|||||||
REGISTER_SCREEN_CLASS( ScreenNetSelectBase );
|
REGISTER_SCREEN_CLASS( ScreenNetSelectBase );
|
||||||
ScreenNetSelectBase::ScreenNetSelectBase( const CString& sName ) : ScreenWithMenuElements( sName )
|
ScreenNetSelectBase::ScreenNetSelectBase( const CString& sName ) : ScreenWithMenuElements( sName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenNetSelectBase::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
//ChatBox
|
//ChatBox
|
||||||
m_sprChatInputBox.SetName( "ChatInputBox" );
|
m_sprChatInputBox.SetName( "ChatInputBox" );
|
||||||
m_sprChatInputBox.Load( THEME->GetPathG( m_sName, "ChatInputBox" ) );
|
m_sprChatInputBox.Load( THEME->GetPathG( m_sName, "ChatInputBox" ) );
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class ScreenNetSelectBase : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenNetSelectBase( const CString& sName );
|
ScreenNetSelectBase( const CString& sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
void Input( const DeviceInput& DeviceI, const InputEventType type,
|
void Input( const DeviceInput& DeviceI, const InputEventType type,
|
||||||
const GameInput& GameI, const MenuInput& MenuI,
|
const GameInput& GameI, const MenuInput& MenuI,
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ ScreenNetSelectMusic::ScreenNetSelectMusic( const CString& sName ) : ScreenNetSe
|
|||||||
{
|
{
|
||||||
/* Finish any previous stage. It's OK to call this when we havn't played a stage yet. */
|
/* Finish any previous stage. It's OK to call this when we havn't played a stage yet. */
|
||||||
GAMESTATE->FinishStage();
|
GAMESTATE->FinishStage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenNetSelectMusic::Init()
|
||||||
|
{
|
||||||
|
ScreenNetSelectBase::Init();
|
||||||
|
|
||||||
//Diff Icon background
|
//Diff Icon background
|
||||||
m_sprDiff.Load( THEME->GetPathG( m_sName, "DiffBG" ) );
|
m_sprDiff.Load( THEME->GetPathG( m_sName, "DiffBG" ) );
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ class ScreenNetSelectMusic : public ScreenNetSelectBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenNetSelectMusic( const CString& sName );
|
ScreenNetSelectMusic( const CString& sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type,
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type,
|
||||||
const GameInput& GameI, const MenuInput& MenuI,
|
const GameInput& GameI, const MenuInput& MenuI,
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ ScreenNetworkOptions::ScreenNetworkOptions( CString sClassName ) : ScreenOptions
|
|||||||
LOG->Trace( "ScreenNetworkOptions::ScreenNetworkOptions()" );
|
LOG->Trace( "ScreenNetworkOptions::ScreenNetworkOptions()" );
|
||||||
|
|
||||||
m_sClassName = sClassName;
|
m_sClassName = sClassName;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenNetworkOptions::Init()
|
||||||
|
{
|
||||||
|
ScreenOptions::Init();
|
||||||
|
|
||||||
g_NetworkOptionsLines[PO_CONNECTION].choices.clear();
|
g_NetworkOptionsLines[PO_CONNECTION].choices.clear();
|
||||||
if ( NSMAN->useSMserver )
|
if ( NSMAN->useSMserver )
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class ScreenNetworkOptions : public ScreenOptions
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenNetworkOptions( CString sName );
|
ScreenNetworkOptions( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
|
|||||||
@@ -113,8 +113,13 @@ ScreenOptions::ScreenOptions( CString sClassName ) : ScreenWithMenuElements(sCla
|
|||||||
CAPITALIZE_ALL_OPTION_NAMES (m_sName,"CapitalizeAllOptionNames")
|
CAPITALIZE_ALL_OPTION_NAMES (m_sName,"CapitalizeAllOptionNames")
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenOptions::ScreenOptions()" );
|
LOG->Trace( "ScreenOptions::ScreenOptions()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScreenOptions::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
m_OptionsNavigation = PREFSMAN->m_bArcadeOptionsNavigation? NAV_THREE_KEY:NAV_FIVE_KEY;
|
m_OptionsNavigation = PREFSMAN->m_bArcadeOptionsNavigation? NAV_THREE_KEY:NAV_FIVE_KEY;
|
||||||
|
|
||||||
m_SoundChangeCol.Load( THEME->GetPathS(m_sName,"change"), true );
|
m_SoundChangeCol.Load( THEME->GetPathS(m_sName,"change"), true );
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ class ScreenOptions : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenOptions( CString sClassName );
|
ScreenOptions( CString sClassName );
|
||||||
|
virtual void Init();
|
||||||
void InitMenu( InputMode im, OptionRowDefinition defs[], int iNumOptionLines, bool bShowUnderlines = true );
|
void InitMenu( InputMode im, OptionRowDefinition defs[], int iNumOptionLines, bool bShowUnderlines = true );
|
||||||
virtual ~ScreenOptions();
|
virtual ~ScreenOptions();
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -458,6 +458,11 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
|
|||||||
ScreenOptions( sClassName )
|
ScreenOptions( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace("ScreenOptionsMaster::ScreenOptionsMaster(%s)", m_sName.c_str() );
|
LOG->Trace("ScreenOptionsMaster::ScreenOptionsMaster(%s)", m_sName.c_str() );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenOptionsMaster::Init()
|
||||||
|
{
|
||||||
|
ScreenOptions::Init();
|
||||||
|
|
||||||
CStringArray asLineNames;
|
CStringArray asLineNames;
|
||||||
split( LINE_NAMES, ",", asLineNames );
|
split( LINE_NAMES, ",", asLineNames );
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class ScreenOptionsMaster: public ScreenOptions
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenOptionsMaster( CString sName );
|
ScreenOptionsMaster( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenOptionsMaster();
|
virtual ~ScreenOptionsMaster();
|
||||||
void Update( float fDelta );
|
void Update( float fDelta );
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,17 @@ const ScreenMessage SM_BackFromURL = ScreenMessage(SM_User+2);
|
|||||||
REGISTER_SCREEN_CLASS( ScreenPackages );
|
REGISTER_SCREEN_CLASS( ScreenPackages );
|
||||||
ScreenPackages::ScreenPackages( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
ScreenPackages::ScreenPackages( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenPackages::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
m_iPackagesPos = 0;
|
m_iPackagesPos = 0;
|
||||||
m_iLinksPos = 0;
|
m_iLinksPos = 0;
|
||||||
m_iDLorLST = 0;
|
m_iDLorLST = 0;
|
||||||
m_bIsDownloading = false;
|
m_bIsDownloading = false;
|
||||||
m_bCanDL = THEME->GetMetricB( sClassName, "CanDL" );
|
m_bCanDL = THEME->GetMetricB( m_sName, "CanDL" );
|
||||||
m_sStatus = "";
|
m_sStatus = "";
|
||||||
m_fLastUpdate = 0;
|
m_fLastUpdate = 0;
|
||||||
m_iTotalBytes = 0;
|
m_iTotalBytes = 0;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class ScreenPackages : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenPackages( CString sName );
|
ScreenPackages( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|||||||
@@ -22,6 +22,11 @@ ScreenPlayerOptions::ScreenPlayerOptions( CString sClassName ) :
|
|||||||
ScreenOptionsMaster( sClassName )
|
ScreenOptionsMaster( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenPlayerOptions::ScreenPlayerOptions()" );
|
LOG->Trace( "ScreenPlayerOptions::ScreenPlayerOptions()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenPlayerOptions::Init()
|
||||||
|
{
|
||||||
|
ScreenOptionsMaster::Init();
|
||||||
|
|
||||||
m_bAskOptionsMessage =
|
m_bAskOptionsMessage =
|
||||||
!GAMESTATE->m_bEditing && PREFSMAN->m_ShowSongOptions == PrefsManager::ASK;
|
!GAMESTATE->m_bEditing && PREFSMAN->m_ShowSongOptions == PrefsManager::ASK;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class ScreenPlayerOptions : public ScreenOptionsMaster
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenPlayerOptions( CString sName );
|
ScreenPlayerOptions( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ REGISTER_SCREEN_CLASS( ScreenProfileOptions );
|
|||||||
ScreenProfileOptions::ScreenProfileOptions( CString sClassName ) : ScreenOptions( sClassName )
|
ScreenProfileOptions::ScreenProfileOptions( CString sClassName ) : ScreenOptions( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenProfileOptions::ScreenProfileOptions()" );
|
LOG->Trace( "ScreenProfileOptions::ScreenProfileOptions()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenProfileOptions::Init()
|
||||||
|
{
|
||||||
|
ScreenOptions::Init();
|
||||||
|
|
||||||
g_ProfileOptionsLines[PO_PLAYER1].choices.clear();
|
g_ProfileOptionsLines[PO_PLAYER1].choices.clear();
|
||||||
g_ProfileOptionsLines[PO_PLAYER1].choices.push_back( "-NONE-" );
|
g_ProfileOptionsLines[PO_PLAYER1].choices.push_back( "-NONE-" );
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class ScreenProfileOptions : public ScreenOptions
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenProfileOptions( CString sName );
|
ScreenProfileOptions( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
|
|||||||
@@ -28,13 +28,19 @@ ScreenPrompt::ScreenPrompt( CString sText, bool bYesNoPrompt, bool bDefaultAnswe
|
|||||||
m_pOnYes = OnYes;
|
m_pOnYes = OnYes;
|
||||||
m_pOnNo = OnNo;
|
m_pOnNo = OnNo;
|
||||||
m_pCallbackData = pCallbackData;
|
m_pCallbackData = pCallbackData;
|
||||||
|
m_sText = sText;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenPrompt::Init()
|
||||||
|
{
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
m_Background.LoadFromAniDir( THEME->GetPathB("ScreenPrompt","background") );
|
m_Background.LoadFromAniDir( THEME->GetPathB("ScreenPrompt","background") );
|
||||||
m_Background.PlayCommand("On");
|
m_Background.PlayCommand("On");
|
||||||
this->AddChild( &m_Background );
|
this->AddChild( &m_Background );
|
||||||
|
|
||||||
m_textQuestion.LoadFromFont( THEME->GetPathF("Common","normal") );
|
m_textQuestion.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||||
m_textQuestion.SetText( sText );
|
m_textQuestion.SetText( m_sText );
|
||||||
m_textQuestion.SetXY( QUESTION_X, QUESTION_Y );
|
m_textQuestion.SetXY( QUESTION_X, QUESTION_Y );
|
||||||
this->AddChild( &m_textQuestion );
|
this->AddChild( &m_textQuestion );
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class ScreenPrompt : public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenPrompt( CString sName );
|
ScreenPrompt( CString sName );
|
||||||
|
virtual void Init();
|
||||||
ScreenPrompt( CString sText, bool bYesNoPrompt=false, bool bDefaultAnswer = false, void(*OnYes)(void*) = NULL, void(*OnNo)(void*) = NULL, void* pCallbackData = NULL );
|
ScreenPrompt( CString sText, bool bYesNoPrompt=false, bool bDefaultAnswer = false, void(*OnYes)(void*) = NULL, void(*OnNo)(void*) = NULL, void* pCallbackData = NULL );
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
@@ -30,7 +31,7 @@ protected:
|
|||||||
void MenuBack( PlayerNumber pn );
|
void MenuBack( PlayerNumber pn );
|
||||||
void MenuStart( PlayerNumber pn );
|
void MenuStart( PlayerNumber pn );
|
||||||
|
|
||||||
|
CString m_sText;
|
||||||
BGAnimation m_Background;
|
BGAnimation m_Background;
|
||||||
BitmapText m_textQuestion;
|
BitmapText m_textQuestion;
|
||||||
Quad m_rectAnswerBox;
|
Quad m_rectAnswerBox;
|
||||||
|
|||||||
@@ -90,6 +90,12 @@ const ScreenMessage SM_HidePage = (ScreenMessage)(SM_User+68);
|
|||||||
REGISTER_SCREEN_CLASS( ScreenRanking );
|
REGISTER_SCREEN_CLASS( ScreenRanking );
|
||||||
ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName )
|
ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenRanking::Init()
|
||||||
|
{
|
||||||
|
ScreenAttract::Init();
|
||||||
|
|
||||||
// init Actors for category and course
|
// init Actors for category and course
|
||||||
{
|
{
|
||||||
m_Banner.SetName( "Banner" );
|
m_Banner.SetName( "Banner" );
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class ScreenRanking : public ScreenAttract
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenRanking( CString sName );
|
ScreenRanking( CString sName );
|
||||||
|
virtual void Init();
|
||||||
~ScreenRanking();
|
~ScreenRanking();
|
||||||
|
|
||||||
void HandleScreenMessage( const ScreenMessage SM );
|
void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|||||||
@@ -49,6 +49,12 @@ public:
|
|||||||
REGISTER_SCREEN_CLASS( ScreenReloadSongs );
|
REGISTER_SCREEN_CLASS( ScreenReloadSongs );
|
||||||
ScreenReloadSongs::ScreenReloadSongs( CString sClassName ): Screen(sClassName)
|
ScreenReloadSongs::ScreenReloadSongs( CString sClassName ): Screen(sClassName)
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenReloadSongs::Init()
|
||||||
|
{
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
m_iUpdates = 0;
|
m_iUpdates = 0;
|
||||||
|
|
||||||
m_Loading.LoadFromFont( THEME->GetPathF("Common", "normal") );
|
m_Loading.LoadFromFont( THEME->GetPathF("Common", "normal") );
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class ScreenReloadSongs: public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenReloadSongs( CString sClassName );
|
ScreenReloadSongs( CString sClassName );
|
||||||
|
virtual void Init();
|
||||||
~ScreenReloadSongs();
|
~ScreenReloadSongs();
|
||||||
void Update( float fDeltaTime );
|
void Update( float fDeltaTime );
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ OptionRowDefinition g_ProfileLine[1] = {
|
|||||||
ScreenSMOnlineLogin::ScreenSMOnlineLogin(CString sClassName) : ScreenOptions(sClassName)
|
ScreenSMOnlineLogin::ScreenSMOnlineLogin(CString sClassName) : ScreenOptions(sClassName)
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenSMOnlineLogin::ScreenSMOnlineLogin()" );
|
LOG->Trace( "ScreenSMOnlineLogin::ScreenSMOnlineLogin()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSMOnlineLogin::Init()
|
||||||
|
{
|
||||||
|
ScreenOptions::Init();
|
||||||
|
|
||||||
g_ProfileLine[0].choices.clear();
|
g_ProfileLine[0].choices.clear();
|
||||||
PROFILEMAN->GetLocalProfileNames( g_ProfileLine[0].choices );
|
PROFILEMAN->GetLocalProfileNames( g_ProfileLine[0].choices );
|
||||||
|
|||||||
@@ -3,9 +3,11 @@
|
|||||||
|
|
||||||
#include "ScreenOptions.h"
|
#include "ScreenOptions.h"
|
||||||
|
|
||||||
class ScreenSMOnlineLogin : public ScreenOptions {
|
class ScreenSMOnlineLogin : public ScreenOptions
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSMOnlineLogin(CString sName);
|
ScreenSMOnlineLogin(CString sName);
|
||||||
|
virtual void Init();
|
||||||
virtual void HandleScreenMessage(const ScreenMessage SM);
|
virtual void HandleScreenMessage(const ScreenMessage SM);
|
||||||
virtual void MenuStart(PlayerNumber pn,const InputEventType type);
|
virtual void MenuStart(PlayerNumber pn,const InputEventType type);
|
||||||
void SendLogin(CString sPassword);
|
void SendLogin(CString sPassword);
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ ScreenSelect::ScreenSelect( CString sClassName ) :
|
|||||||
IDLE_TIMEOUT_SECONDS(m_sName,"IdleTimeoutSeconds")
|
IDLE_TIMEOUT_SECONDS(m_sName,"IdleTimeoutSeconds")
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenSelect::ScreenSelect()" );
|
LOG->Trace( "ScreenSelect::ScreenSelect()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelect::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Load choices
|
// Load choices
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class ScreenSelect : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSelect( CString sClassName );
|
ScreenSelect( CString sClassName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenSelect();
|
virtual ~ScreenSelect();
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
|
|||||||
@@ -77,7 +77,12 @@ ScreenSelectCharacter::ScreenSelectCharacter( CString sClassName ) : ScreenWithM
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScreenSelectCharacter::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class ScreenSelectCharacter : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSelectCharacter( CString sName );
|
ScreenSelectCharacter( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenSelectCharacter();
|
virtual ~ScreenSelectCharacter();
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ REGISTER_SCREEN_CLASS( ScreenSelectDifficulty );
|
|||||||
ScreenSelectDifficulty::ScreenSelectDifficulty( CString sClassName ) : ScreenSelect( sClassName )
|
ScreenSelectDifficulty::ScreenSelectDifficulty( CString sClassName ) : ScreenSelect( sClassName )
|
||||||
{
|
{
|
||||||
m_CurrentPage = PAGE_1;
|
m_CurrentPage = PAGE_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectDifficulty::Init()
|
||||||
|
{
|
||||||
|
ScreenSelect::Init();
|
||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
@@ -38,7 +43,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty( CString sClassName ) : ScreenSel
|
|||||||
m_bChosen[p] = false;
|
m_bChosen[p] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned c; // GCC is bitching again.
|
unsigned c;
|
||||||
for( c=0; c<m_aGameCommands.size(); c++ )
|
for( c=0; c<m_aGameCommands.size(); c++ )
|
||||||
{
|
{
|
||||||
if( (int)c < NUM_CHOICES_ON_PAGE_1 )
|
if( (int)c < NUM_CHOICES_ON_PAGE_1 )
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class ScreenSelectDifficulty : public ScreenSelect
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSelectDifficulty( CString sName );
|
ScreenSelectDifficulty( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,11 @@ ScreenSelectGroup::ScreenSelectGroup( CString sClassName ) : ScreenWithMenuEleme
|
|||||||
HandleScreenMessage( SM_GoToNextScreen );
|
HandleScreenMessage( SM_GoToNextScreen );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectGroup::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
vector<Song*> aAllSongs;
|
vector<Song*> aAllSongs;
|
||||||
SONGMAN->GetSongs( aAllSongs );
|
SONGMAN->GetSongs( aAllSongs );
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class ScreenSelectGroup : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSelectGroup( CString sName );
|
ScreenSelectGroup( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ ScreenSelectMaster::ScreenSelectMaster( CString sClassName ) : ScreenSelect( sCl
|
|||||||
SCROLLER_SPACING_Y(m_sName,"ScrollerSpacingY"),
|
SCROLLER_SPACING_Y(m_sName,"ScrollerSpacingY"),
|
||||||
DEFAULT_CHOICE(m_sName,"DefaultChoice")
|
DEFAULT_CHOICE(m_sName,"DefaultChoice")
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectMaster::Init()
|
||||||
|
{
|
||||||
|
ScreenSelect::Init();
|
||||||
|
|
||||||
// TODO: Move default choice to ScreenSelect
|
// TODO: Move default choice to ScreenSelect
|
||||||
int iDefaultChoice = -1;
|
int iDefaultChoice = -1;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class ScreenSelectMaster : public ScreenSelect
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSelectMaster( CString sName );
|
ScreenSelectMaster( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ Desc: Sets up the screen display
|
|||||||
REGISTER_SCREEN_CLASS( ScreenSelectMode );
|
REGISTER_SCREEN_CLASS( ScreenSelectMode );
|
||||||
ScreenSelectMode::ScreenSelectMode( CString sClassName ) : ScreenSelect( sClassName )
|
ScreenSelectMode::ScreenSelectMode( CString sClassName ) : ScreenSelect( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectMode::Init()
|
||||||
|
{
|
||||||
|
ScreenSelect::Init();
|
||||||
|
|
||||||
m_b2DAvailable = m_bCharsAvailable = false;
|
m_b2DAvailable = m_bCharsAvailable = false;
|
||||||
|
|
||||||
int pn;
|
int pn;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class ScreenSelectMode : public ScreenSelect
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSelectMode( CString sName ); // Constructor
|
ScreenSelectMode( CString sName ); // Constructor
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenSelectMode(); // Destructor
|
virtual ~ScreenSelectMode(); // Destructor
|
||||||
virtual void MenuLeft( PlayerNumber pn );
|
virtual void MenuLeft( PlayerNumber pn );
|
||||||
virtual void MenuRight( PlayerNumber pn );
|
virtual void MenuRight( PlayerNumber pn );
|
||||||
|
|||||||
@@ -68,11 +68,17 @@ ScreenSelectMusic::ScreenSelectMusic( CString sClassName ) : ScreenWithMenuEleme
|
|||||||
|
|
||||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
|
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
|
||||||
|
|
||||||
m_DisplayMode = GAMESTATE->IsCourseMode() ? DISPLAY_COURSES : DISPLAY_SONGS;
|
|
||||||
|
|
||||||
/* Finish any previous stage. It's OK to call this when we havn't played a stage yet.
|
/* Finish any previous stage. It's OK to call this when we havn't played a stage yet.
|
||||||
* Do this before anything that might look at GAMESTATE->m_iCurrentStageIndex. */
|
* Do this before anything that might look at GAMESTATE->m_iCurrentStageIndex. */
|
||||||
GAMESTATE->FinishStage();
|
GAMESTATE->FinishStage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScreenSelectMusic::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
|
m_DisplayMode = GAMESTATE->IsCourseMode() ? DISPLAY_COURSES : DISPLAY_SONGS;
|
||||||
|
|
||||||
/* Cache: */
|
/* Cache: */
|
||||||
g_sFallbackCDTitlePath = THEME->GetPathG(m_sName,"fallback cdtitle");
|
g_sFallbackCDTitlePath = THEME->GetPathG(m_sName,"fallback cdtitle");
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class ScreenSelectMusic : public ScreenWithMenuElements
|
|||||||
public:
|
public:
|
||||||
ScreenSelectMusic( CString sName );
|
ScreenSelectMusic( CString sName );
|
||||||
virtual ~ScreenSelectMusic();
|
virtual ~ScreenSelectMusic();
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,14 @@
|
|||||||
REGISTER_SCREEN_CLASS( ScreenSelectStyle );
|
REGISTER_SCREEN_CLASS( ScreenSelectStyle );
|
||||||
ScreenSelectStyle::ScreenSelectStyle( CString sClassName ) : ScreenSelect( sClassName )
|
ScreenSelectStyle::ScreenSelectStyle( CString sClassName ) : ScreenSelect( sClassName )
|
||||||
{
|
{
|
||||||
m_iSelection = 0;
|
|
||||||
|
|
||||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
|
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSelectStyle::Init()
|
||||||
|
{
|
||||||
|
ScreenSelect::Init();
|
||||||
|
|
||||||
|
m_iSelection = 0;
|
||||||
|
|
||||||
for( unsigned i=0; i<m_aGameCommands.size(); i++ )
|
for( unsigned i=0; i<m_aGameCommands.size(); i++ )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class ScreenSelectStyle : public ScreenSelect
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSelectStyle( CString sName );
|
ScreenSelectStyle( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void MenuLeft( PlayerNumber pn );
|
virtual void MenuLeft( PlayerNumber pn );
|
||||||
virtual void MenuRight( PlayerNumber pn );
|
virtual void MenuRight( PlayerNumber pn );
|
||||||
|
|||||||
@@ -40,7 +40,12 @@ REGISTER_SCREEN_CLASS( ScreenSetTime );
|
|||||||
ScreenSetTime::ScreenSetTime( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
ScreenSetTime::ScreenSetTime( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenSetTime::ScreenSetTime()" );
|
LOG->Trace( "ScreenSetTime::ScreenSetTime()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSetTime::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
m_Selection = hour;
|
m_Selection = hour;
|
||||||
|
|
||||||
FOREACH_PlayerNumber( pn )
|
FOREACH_PlayerNumber( pn )
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class ScreenSetTime : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSetTime( CString sName );
|
ScreenSetTime( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ REGISTER_SCREEN_CLASS( ScreenSongOptions );
|
|||||||
ScreenSongOptions::ScreenSongOptions( CString sClassName ) :
|
ScreenSongOptions::ScreenSongOptions( CString sClassName ) :
|
||||||
ScreenOptionsMaster( sClassName )
|
ScreenOptionsMaster( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScreenSongOptions::Init()
|
||||||
|
{
|
||||||
|
ScreenOptionsMaster::Init();
|
||||||
|
|
||||||
/* Hack: If we're coming in from "press start for more options", we need a different
|
/* Hack: If we're coming in from "press start for more options", we need a different
|
||||||
* fade in. */
|
* fade in. */
|
||||||
if(PREFSMAN->m_ShowSongOptions == PrefsManager::ASK)
|
if(PREFSMAN->m_ShowSongOptions == PrefsManager::ASK)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class ScreenSongOptions : public ScreenOptionsMaster
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSongOptions( CString sName );
|
ScreenSongOptions( CString sName );
|
||||||
|
virtual void Init();
|
||||||
static CString GetNextScreen();
|
static CString GetNextScreen();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ ScreenSplash::ScreenSplash( CString sClassName ) : ScreenWithMenuElements( sClas
|
|||||||
PREV_SCREEN (m_sName,"PrevScreen"),
|
PREV_SCREEN (m_sName,"PrevScreen"),
|
||||||
MINIMUM_LOAD_DELAY_SECONDS (m_sName,"MinimumLoadDelaySeconds")
|
MINIMUM_LOAD_DELAY_SECONDS (m_sName,"MinimumLoadDelaySeconds")
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSplash::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
/* Prep the new screen once m_sprOverlay is complete. */
|
/* Prep the new screen once m_sprOverlay is complete. */
|
||||||
this->PostScreenMessage( SM_PrepScreen, m_In.GetTweenTimeLeft() );
|
this->PostScreenMessage( SM_PrepScreen, m_In.GetTweenTimeLeft() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class ScreenSplash : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenSplash( CString sName );
|
ScreenSplash( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
virtual void MenuBack( PlayerNumber pn );
|
virtual void MenuBack( PlayerNumber pn );
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ const ScreenMessage SM_PrepScreen = (ScreenMessage)(SM_User+0);
|
|||||||
REGISTER_SCREEN_CLASS( ScreenStage );
|
REGISTER_SCREEN_CLASS( ScreenStage );
|
||||||
ScreenStage::ScreenStage( CString sClassName ) : Screen( sClassName )
|
ScreenStage::ScreenStage( CString sClassName ) : Screen( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenStage::Init()
|
||||||
|
{
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
m_bZeroDeltaOnNextUpdate = false;
|
m_bZeroDeltaOnNextUpdate = false;
|
||||||
|
|
||||||
SOUND->StopMusic();
|
SOUND->StopMusic();
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class ScreenStage : public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenStage( CString sName );
|
ScreenStage( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ const ScreenMessage SM_StartClosing = ScreenMessage(SM_User-8);
|
|||||||
REGISTER_SCREEN_CLASS( ScreenStyleSplash );
|
REGISTER_SCREEN_CLASS( ScreenStyleSplash );
|
||||||
ScreenStyleSplash::ScreenStyleSplash( CString sName ) : ScreenWithMenuElements( sName )
|
ScreenStyleSplash::ScreenStyleSplash( CString sName ) : ScreenWithMenuElements( sName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenStyleSplash::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
SOUND->StopMusic();
|
SOUND->StopMusic();
|
||||||
|
|
||||||
CString sGameName = GAMESTATE->GetCurrentGame()->m_szName;
|
CString sGameName = GAMESTATE->GetCurrentGame()->m_szName;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class ScreenStyleSplash : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenStyleSplash( CString sName );
|
ScreenStyleSplash( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|||||||
@@ -31,6 +31,12 @@
|
|||||||
//REGISTER_SCREEN_CLASS( ScreenSystemLayer );
|
//REGISTER_SCREEN_CLASS( ScreenSystemLayer );
|
||||||
ScreenSystemLayer::ScreenSystemLayer() : Screen("ScreenSystemLayer")
|
ScreenSystemLayer::ScreenSystemLayer() : Screen("ScreenSystemLayer")
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenSystemLayer::Init()
|
||||||
|
{
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
this->AddChild(&m_textMessage);
|
this->AddChild(&m_textMessage);
|
||||||
this->AddChild(&m_textStats);
|
this->AddChild(&m_textStats);
|
||||||
this->AddChild(&m_textTime);
|
this->AddChild(&m_textTime);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class ScreenSystemLayer : public Screen
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ScreenSystemLayer();
|
ScreenSystemLayer();
|
||||||
|
virtual void Init();
|
||||||
void SystemMessage( const CString &sMessage );
|
void SystemMessage( const CString &sMessage );
|
||||||
void SystemMessageNoAnimate( const CString &sMessage );
|
void SystemMessageNoAnimate( const CString &sMessage );
|
||||||
void ReloadCreditsText();
|
void ReloadCreditsText();
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ REGISTER_SCREEN_CLASS( ScreenTest );
|
|||||||
ScreenTest::ScreenTest( CString sClassName ) : Screen( sClassName )
|
ScreenTest::ScreenTest( CString sClassName ) : Screen( sClassName )
|
||||||
{
|
{
|
||||||
current = NULL;
|
current = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenTest::Init()
|
||||||
|
{
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
cur_screen = -1;
|
cur_screen = -1;
|
||||||
|
|
||||||
SOUND->StopMusic();
|
SOUND->StopMusic();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ class ScreenTest : public Screen
|
|||||||
public:
|
public:
|
||||||
ScreenTest( CString sName );
|
ScreenTest( CString sName );
|
||||||
~ScreenTest();
|
~ScreenTest();
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ void ScreenTestFonts::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
REGISTER_SCREEN_CLASS( ScreenTestFonts );
|
REGISTER_SCREEN_CLASS( ScreenTestFonts );
|
||||||
ScreenTestFonts::ScreenTestFonts( CString sClassName ) : Screen( sClassName )
|
ScreenTestFonts::ScreenTestFonts( CString sClassName ) : Screen( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenTestFonts::Init()
|
||||||
|
{
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
Hline.SetXY(SCREEN_CENTER_X, SCREEN_CENTER_Y);
|
Hline.SetXY(SCREEN_CENTER_X, SCREEN_CENTER_Y);
|
||||||
Hline.SetZoomX(LineWidth);
|
Hline.SetZoomX(LineWidth);
|
||||||
Hline.SetDiffuse( RageColor(1, 1, 1, 1) );
|
Hline.SetDiffuse( RageColor(1, 1, 1, 1) );
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class ScreenTestFonts: public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenTestFonts( CString sName );
|
ScreenTestFonts( CString sName );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
void Draw();
|
void Draw();
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ REGISTER_SCREEN_CLASS( ScreenTestInput );
|
|||||||
ScreenTestInput::ScreenTestInput( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
ScreenTestInput::ScreenTestInput( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenTestInput::ScreenTestInput()" );
|
LOG->Trace( "ScreenTestInput::ScreenTestInput()" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenTestInput::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
m_textInputs.LoadFromFont( THEME->GetPathF("Common","normal") );
|
m_textInputs.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||||
m_textInputs.SetText( "" );
|
m_textInputs.SetText( "" );
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class ScreenTestInput : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenTestInput( CString sName );
|
ScreenTestInput( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenTestInput();
|
virtual ~ScreenTestInput();
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|||||||
@@ -15,7 +15,13 @@ REGISTER_SCREEN_CLASS( ScreenTestLights );
|
|||||||
ScreenTestLights::ScreenTestLights( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
ScreenTestLights::ScreenTestLights( CString sClassName ) : ScreenWithMenuElements( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenTestLights::ScreenTestLights()" );
|
LOG->Trace( "ScreenTestLights::ScreenTestLights()" );
|
||||||
|
|
||||||
|
LIGHTSMAN->SetLightsMode( LIGHTSMODE_TEST );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenTestLights::Init()
|
||||||
|
{
|
||||||
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
m_textInputs.LoadFromFont( THEME->GetPathF("Common","normal") );
|
m_textInputs.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||||
m_textInputs.SetText( "" );
|
m_textInputs.SetText( "" );
|
||||||
@@ -25,8 +31,6 @@ ScreenTestLights::ScreenTestLights( CString sClassName ) : ScreenWithMenuElement
|
|||||||
this->AddChild( &m_textInputs );
|
this->AddChild( &m_textInputs );
|
||||||
|
|
||||||
SOUND->PlayMusic( THEME->GetPathS("ScreenTestLights","music") );
|
SOUND->PlayMusic( THEME->GetPathS("ScreenTestLights","music") );
|
||||||
|
|
||||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_TEST );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class ScreenTestLights : public ScreenWithMenuElements
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenTestLights( CString sName );
|
ScreenTestLights( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenTestLights();
|
virtual ~ScreenTestLights();
|
||||||
|
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|||||||
@@ -9,6 +9,12 @@
|
|||||||
REGISTER_SCREEN_CLASS( ScreenTestSound );
|
REGISTER_SCREEN_CLASS( ScreenTestSound );
|
||||||
ScreenTestSound::ScreenTestSound( CString sClassName ) : Screen( sClassName )
|
ScreenTestSound::ScreenTestSound( CString sClassName ) : Screen( sClassName )
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenTestSound::Init()
|
||||||
|
{
|
||||||
|
Screen::Init();
|
||||||
|
|
||||||
this->AddChild(&HEEEEEEEEELP);
|
this->AddChild(&HEEEEEEEEELP);
|
||||||
|
|
||||||
HEEEEEEEEELP.SetXY(450, 400);
|
HEEEEEEEEELP.SetXY(450, 400);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class ScreenTestSound : public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenTestSound( CString sName );
|
ScreenTestSound( CString sName );
|
||||||
|
virtual void Init();
|
||||||
~ScreenTestSound();
|
~ScreenTestSound();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ bool ScreenTextEntry::s_bCancelledLast = false;
|
|||||||
ScreenTextEntry::ScreenTextEntry( CString sClassName, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer), void(*OnCancel)(), bool bPassword ) :
|
ScreenTextEntry::ScreenTextEntry( CString sClassName, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer), void(*OnCancel)(), bool bPassword ) :
|
||||||
Screen( sClassName )
|
Screen( sClassName )
|
||||||
{
|
{
|
||||||
m_bPassword = bPassword; // Added Password Support -APL 1/20/05
|
|
||||||
m_bIsTransparent = true; // draw screens below us
|
m_bIsTransparent = true; // draw screens below us
|
||||||
|
m_bPassword = bPassword;
|
||||||
|
|
||||||
m_pOnOK = OnOK;
|
m_pOnOK = OnOK;
|
||||||
m_pOnCancel = OnCancel;
|
m_pOnCancel = OnCancel;
|
||||||
@@ -43,11 +43,16 @@ ScreenTextEntry::ScreenTextEntry( CString sClassName, CString sQuestion, CString
|
|||||||
m_sAnswer = CStringToWstring(sInitialAnswer);
|
m_sAnswer = CStringToWstring(sInitialAnswer);
|
||||||
m_bCancelled = false;
|
m_bCancelled = false;
|
||||||
|
|
||||||
|
m_sQuestion = sQuestion;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenTextEntry::Init()
|
||||||
|
{
|
||||||
m_Background.LoadFromAniDir( THEME->GetPathB("ScreenPrompt","background") );
|
m_Background.LoadFromAniDir( THEME->GetPathB("ScreenPrompt","background") );
|
||||||
this->AddChild( &m_Background );
|
this->AddChild( &m_Background );
|
||||||
|
|
||||||
m_textQuestion.LoadFromFont( THEME->GetPathF("Common","normal") );
|
m_textQuestion.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||||
m_textQuestion.SetText( sQuestion );
|
m_textQuestion.SetText( m_sQuestion );
|
||||||
m_textQuestion.SetXY( QUESTION_X, QUESTION_Y );
|
m_textQuestion.SetXY( QUESTION_X, QUESTION_Y );
|
||||||
this->AddChild( &m_textQuestion );
|
this->AddChild( &m_textQuestion );
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class ScreenTextEntry : public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenTextEntry( CString sName, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer) = NULL, void(*OnCanel)() = NULL, bool bPassword = false );
|
ScreenTextEntry( CString sName, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer) = NULL, void(*OnCanel)() = NULL, bool bPassword = false );
|
||||||
|
virtual void Init();
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
@@ -31,6 +32,7 @@ protected:
|
|||||||
|
|
||||||
void UpdateText();
|
void UpdateText();
|
||||||
|
|
||||||
|
CString m_sQuestion;
|
||||||
bool m_bPassword;
|
bool m_bPassword;
|
||||||
BGAnimation m_Background;
|
BGAnimation m_Background;
|
||||||
BitmapText m_textQuestion;
|
BitmapText m_textQuestion;
|
||||||
|
|||||||
@@ -52,7 +52,11 @@ ScreenTitleMenu::ScreenTitleMenu( CString sScreenName ) :
|
|||||||
|
|
||||||
// TRICKY: Do this after GameState::Reset.
|
// TRICKY: Do this after GameState::Reset.
|
||||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_JOINING );
|
LIGHTSMAN->SetLightsMode( LIGHTSMODE_JOINING );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenTitleMenu::Init()
|
||||||
|
{
|
||||||
|
ScreenSelectMaster::Init();
|
||||||
|
|
||||||
m_sprLogo.Load( THEME->GetPathG(m_sName,GAMESTATE->GetCurrentGame()->m_szName) );
|
m_sprLogo.Load( THEME->GetPathG(m_sName,GAMESTATE->GetCurrentGame()->m_szName) );
|
||||||
m_sprLogo->SetName( "Logo" );
|
m_sprLogo->SetName( "Logo" );
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class ScreenTitleMenu : public ScreenSelectMaster
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenTitleMenu( CString sName );
|
ScreenTitleMenu( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenTitleMenu();
|
virtual ~ScreenTitleMenu();
|
||||||
|
|
||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
|
|||||||
@@ -32,15 +32,20 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
|
|||||||
{
|
{
|
||||||
LOG->Trace("ScreenUnlock::ScreenUnlock()");
|
LOG->Trace("ScreenUnlock::ScreenUnlock()");
|
||||||
|
|
||||||
unsigned NumUnlocks = NUM_UNLOCKS;
|
unsigned NumUnlocks = min( (unsigned) NUM_UNLOCKS, UNLOCKMAN->m_SongEntries.size() );
|
||||||
if (UNLOCKMAN->m_SongEntries.size() < NumUnlocks)
|
|
||||||
NumUnlocks = UNLOCKMAN->m_SongEntries.size();
|
|
||||||
|
|
||||||
if (!PREFSMAN->m_bUseUnlockSystem || NumUnlocks == 0)
|
if (!PREFSMAN->m_bUseUnlockSystem || NumUnlocks == 0)
|
||||||
{
|
{
|
||||||
this->HandleScreenMessage( SM_GoToNextScreen );
|
this->HandleScreenMessage( SM_GoToNextScreen );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenUnlock::Init()
|
||||||
|
{
|
||||||
|
ScreenAttract::Init();
|
||||||
|
|
||||||
|
unsigned NumUnlocks = min( (unsigned) NUM_UNLOCKS, UNLOCKMAN->m_SongEntries.size() );
|
||||||
|
|
||||||
PointsUntilNextUnlock.LoadFromFont( THEME->GetPathF("Common","normal") );
|
PointsUntilNextUnlock.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||||
PointsUntilNextUnlock.SetHorizAlign( Actor::align_left );
|
PointsUntilNextUnlock.SetHorizAlign( Actor::align_left );
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class ScreenUnlock : public ScreenAttract
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenUnlock( CString sName );
|
ScreenUnlock( CString sName );
|
||||||
|
virtual void Init();
|
||||||
~ScreenUnlock();
|
~ScreenUnlock();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -18,18 +18,19 @@
|
|||||||
//REGISTER_SCREEN_CLASS( ScreenWithMenuElements );
|
//REGISTER_SCREEN_CLASS( ScreenWithMenuElements );
|
||||||
ScreenWithMenuElements::ScreenWithMenuElements( CString sClassName ) : Screen( sClassName )
|
ScreenWithMenuElements::ScreenWithMenuElements( CString sClassName ) : Screen( sClassName )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenWithMenuElements::ScreenWithMenuElements()" );
|
|
||||||
|
|
||||||
m_MenuTimer = new MenuTimer;
|
m_MenuTimer = new MenuTimer;
|
||||||
m_textHelp = new HelpDisplay;
|
m_textHelp = new HelpDisplay;
|
||||||
|
}
|
||||||
|
|
||||||
m_FirstUpdateCommand.Load( sClassName, "FirstUpdateCommand" );
|
void ScreenWithMenuElements::Init()
|
||||||
|
{
|
||||||
|
LOG->Trace( "ScreenWithMenuElements::Init()" );
|
||||||
|
|
||||||
LOG->Trace( "MenuElements::MenuElements()" );
|
Screen::Init();
|
||||||
|
|
||||||
ASSERT( this->m_SubActors.empty() ); // don't call Load twice!
|
m_FirstUpdateCommand.Load( m_sName, "FirstUpdateCommand" );
|
||||||
|
|
||||||
this->SetName( sClassName );
|
ASSERT( this->m_SubActors.empty() ); // don't call Init twice!
|
||||||
|
|
||||||
m_autoHeader.Load( THEME->GetPathG(m_sName,"header") );
|
m_autoHeader.Load( THEME->GetPathG(m_sName,"header") );
|
||||||
m_autoHeader->SetName("Header");
|
m_autoHeader->SetName("Header");
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class ScreenWithMenuElements : public Screen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScreenWithMenuElements( CString sName );
|
ScreenWithMenuElements( CString sName );
|
||||||
|
virtual void Init();
|
||||||
virtual ~ScreenWithMenuElements();
|
virtual ~ScreenWithMenuElements();
|
||||||
|
|
||||||
void Update( float fDeltaTime );
|
void Update( float fDeltaTime );
|
||||||
|
|||||||
Reference in New Issue
Block a user