This commit is contained in:
Glenn Maynard
2006-01-27 23:38:19 +00:00
parent 258b476eb0
commit 35ce203137
2 changed files with 12 additions and 2 deletions
+7 -2
View File
@@ -75,6 +75,11 @@ REGISTER_SCREEN_CLASS( ScreenTextEntry );
void ScreenTextEntry::Init()
{
ROW_START_X.Load( m_sName, "RowStartX" );
ROW_START_Y.Load( m_sName, "RowStartY" );
ROW_END_X.Load( m_sName, "RowEndX" );
ROW_END_Y.Load( m_sName, "RowEndY" );
ScreenWithMenuElements::Init();
m_textQuestion.LoadFromFont( THEME->GetPathF(m_sName,"question") );
@@ -148,8 +153,8 @@ void ScreenTextEntry::BeginScreen()
for( int x=0; x<KEYS_PER_ROW; ++x )
{
BitmapText &bt = *m_ptextKeys[r][x];
float fX = roundf( SCALE( x, 0, KEYS_PER_ROW-1, SCREEN_LEFT+100, SCREEN_RIGHT-100 ) );
float fY = roundf( SCALE( r, 0, NUM_KEYBOARD_ROWS-1, SCREEN_CENTER_Y-30, SCREEN_BOTTOM-80 ) );
float fX = roundf( SCALE( x, 0, KEYS_PER_ROW-1, ROW_START_X, ROW_END_X ) );
float fY = roundf( SCALE( r, 0, NUM_KEYBOARD_ROWS-1, ROW_START_Y, ROW_END_Y ) );
bt.SetXY( fX, fY );
}
}
+5
View File
@@ -6,6 +6,7 @@
#include "ScreenWithMenuElements.h"
#include "BitmapText.h"
#include "RageSound.h"
#include "ThemeMetric.h"
enum KeyboardRow
{
@@ -84,6 +85,10 @@ protected:
void PositionCursor();
BitmapText *m_ptextKeys[NUM_KEYBOARD_ROWS][KEYS_PER_ROW];
ThemeMetric<float> ROW_START_X;
ThemeMetric<float> ROW_START_Y;
ThemeMetric<float> ROW_END_X;
ThemeMetric<float> ROW_END_Y;
RageSound m_sndType;
RageSound m_sndBackspace;