fix secondary button text

This commit is contained in:
Chris Danford
2006-01-25 19:16:19 +00:00
parent 17ac1647fd
commit 4c15ede668
+21 -17
View File
@@ -60,23 +60,27 @@ void ScreenMapControllers::Init()
{ {
KeyToMap *pKey = &m_KeysToMap[b]; KeyToMap *pKey = &m_KeysToMap[b];
BitmapText *pName = new BitmapText; {
pName->SetName( "Title" ); BitmapText *pName = new BitmapText;
pName->LoadFromFont( THEME->GetPathF("Common","title") ); pName->SetName( "Title" );
RString sText = GameButtonToLocalizedString( GAMESTATE->GetCurrentGame(), pKey->m_GameButton ); pName->LoadFromFont( THEME->GetPathF("Common","title") );
pName->SetText( sText ); RString sText = GameButtonToLocalizedString( GAMESTATE->GetCurrentGame(), pKey->m_GameButton );
ActorUtil::LoadAllCommands( *pName, m_sName ); pName->SetText( sText );
m_Line[b].AddChild( pName ); ActorUtil::LoadAllCommands( *pName, m_sName );
m_Line[b].AddChild( pName );
BitmapText *pSecondary = new BitmapText; }
pSecondary->SetName( "Secondary" ); {
pSecondary->LoadFromFont( THEME->GetPathF("Common","title") ); BitmapText *pSecondary = new BitmapText;
MenuButton mb = GAMEMAN->GetMenuButtonSecondaryFunction( GAMESTATE->GetCurrentGame(), pKey->m_GameButton ); pSecondary->SetName( "Secondary" );
if( mb != MenuButton_INVALID ) pSecondary->LoadFromFont( THEME->GetPathF("Common","title") );
sText = MenuButtonToLocalizedString( mb ); MenuButton mb = GAMEMAN->GetMenuButtonSecondaryFunction( GAMESTATE->GetCurrentGame(), pKey->m_GameButton );
ActorUtil::LoadAllCommands( *pSecondary, m_sName ); RString sText;
pSecondary->SetText( sText ); if( mb != MenuButton_INVALID )
m_Line[b].AddChild( pSecondary ); sText = MenuButtonToLocalizedString( mb );
ActorUtil::LoadAllCommands( *pSecondary, m_sName );
pSecondary->SetText( sText );
m_Line[b].AddChild( pSecondary );
}
for( int p=0; p<MAX_GAME_CONTROLLERS; p++ ) for( int p=0; p<MAX_GAME_CONTROLLERS; p++ )
{ {