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