Always call LoadAllCommands explicitly.

The hack to LoadAllCommands when playing a command was leading to weird interactions: If a theme element contained an OnCommand, it would cause the rest of the commands defined in metrics to not be loaded.
This commit is contained in:
Chris Danford
2007-02-19 09:30:07 +00:00
parent d72ebfa33e
commit 599db61b62
42 changed files with 236 additions and 236 deletions
+3 -3
View File
@@ -18,19 +18,19 @@ void ScreenBookkeeping::Init()
m_textAllTime.LoadFromFont( THEME->GetPathF(m_sName,"AllTime") );
m_textAllTime.SetName( "AllTime" );
SET_XY_AND_ON_COMMAND( m_textAllTime );
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textAllTime );
this->AddChild( &m_textAllTime );
m_textTitle.LoadFromFont( THEME->GetPathF(m_sName,"title") );
m_textTitle.SetName( "Title" );
SET_XY_AND_ON_COMMAND( m_textTitle );
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textTitle );
this->AddChild( &m_textTitle );
for( int i=0; i<NUM_BOOKKEEPING_COLS; i++ )
{
m_textData[i].LoadFromFont( THEME->GetPathF(m_sName,"data") );
m_textData[i].SetName( "Data" );
SET_XY_AND_ON_COMMAND( m_textData[i] );
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textData[i] );
float fX = SCALE( i, 0.f, NUM_BOOKKEEPING_COLS-1, SCREEN_LEFT+50, SCREEN_RIGHT-160 );
m_textData[i].SetX( fX );
this->AddChild( &m_textData[i] );