just init the keyboard text once
This commit is contained in:
@@ -113,6 +113,11 @@ void ScreenTextEntry::Init()
|
|||||||
BitmapText *&pbt = m_ptextKeys[r][x];
|
BitmapText *&pbt = m_ptextKeys[r][x];
|
||||||
pbt = static_cast<BitmapText *>( text.Copy() ); // XXX: Copy() should be covariant
|
pbt = static_cast<BitmapText *>( text.Copy() ); // XXX: Copy() should be covariant
|
||||||
this->AddChild( pbt );
|
this->AddChild( pbt );
|
||||||
|
|
||||||
|
RString s = g_szKeys[r][x];
|
||||||
|
if( !s.empty() && r == KEYBOARD_ROW_SPECIAL )
|
||||||
|
s = THEME->GetString( m_sName, s );
|
||||||
|
pbt->SetText( s );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -157,26 +162,9 @@ void ScreenTextEntry::BeginScreen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateKeyboardText();
|
|
||||||
|
|
||||||
PositionCursor();
|
PositionCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenTextEntry::UpdateKeyboardText()
|
|
||||||
{
|
|
||||||
FOREACH_KeyboardRow( r )
|
|
||||||
{
|
|
||||||
for( int x=0; x<KEYS_PER_ROW; ++x )
|
|
||||||
{
|
|
||||||
RString s = g_szKeys[r][x];
|
|
||||||
if( !s.empty() && r == KEYBOARD_ROW_SPECIAL )
|
|
||||||
s = THEME->GetString( "ScreenTextEntry", s );
|
|
||||||
BitmapText &bt = *m_ptextKeys[r][x];
|
|
||||||
bt.SetText( s );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenTextEntry::UpdateAnswerText()
|
void ScreenTextEntry::UpdateAnswerText()
|
||||||
{
|
{
|
||||||
RString s;
|
RString s;
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ protected:
|
|||||||
virtual void MenuStart( PlayerNumber pn );
|
virtual void MenuStart( PlayerNumber pn );
|
||||||
virtual void MenuBack( PlayerNumber pn );
|
virtual void MenuBack( PlayerNumber pn );
|
||||||
|
|
||||||
void UpdateKeyboardText();
|
|
||||||
void UpdateAnswerText();
|
void UpdateAnswerText();
|
||||||
|
|
||||||
BitmapText m_textQuestion;
|
BitmapText m_textQuestion;
|
||||||
|
|||||||
Reference in New Issue
Block a user