From 4e544cf6d77447bf411aa27d712efe31781e41d9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 29 Jan 2006 00:24:38 +0000 Subject: [PATCH] just init the keyboard text once --- stepmania/src/ScreenTextEntry.cpp | 22 +++++----------------- stepmania/src/ScreenTextEntry.h | 1 - 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/stepmania/src/ScreenTextEntry.cpp b/stepmania/src/ScreenTextEntry.cpp index bb2eff5893..3cb3ad1b3d 100644 --- a/stepmania/src/ScreenTextEntry.cpp +++ b/stepmania/src/ScreenTextEntry.cpp @@ -113,6 +113,11 @@ void ScreenTextEntry::Init() BitmapText *&pbt = m_ptextKeys[r][x]; pbt = static_cast( text.Copy() ); // XXX: Copy() should be covariant 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(); } -void ScreenTextEntry::UpdateKeyboardText() -{ - FOREACH_KeyboardRow( r ) - { - for( int x=0; xGetString( "ScreenTextEntry", s ); - BitmapText &bt = *m_ptextKeys[r][x]; - bt.SetText( s ); - } - } -} - void ScreenTextEntry::UpdateAnswerText() { RString s; diff --git a/stepmania/src/ScreenTextEntry.h b/stepmania/src/ScreenTextEntry.h index 5e97cb498a..b66d3639be 100644 --- a/stepmania/src/ScreenTextEntry.h +++ b/stepmania/src/ScreenTextEntry.h @@ -69,7 +69,6 @@ protected: virtual void MenuStart( PlayerNumber pn ); virtual void MenuBack( PlayerNumber pn ); - void UpdateKeyboardText(); void UpdateAnswerText(); BitmapText m_textQuestion;