themable
This commit is contained in:
@@ -75,6 +75,11 @@ REGISTER_SCREEN_CLASS( ScreenTextEntry );
|
|||||||
|
|
||||||
void ScreenTextEntry::Init()
|
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();
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
m_textQuestion.LoadFromFont( THEME->GetPathF(m_sName,"question") );
|
m_textQuestion.LoadFromFont( THEME->GetPathF(m_sName,"question") );
|
||||||
@@ -148,8 +153,8 @@ void ScreenTextEntry::BeginScreen()
|
|||||||
for( int x=0; x<KEYS_PER_ROW; ++x )
|
for( int x=0; x<KEYS_PER_ROW; ++x )
|
||||||
{
|
{
|
||||||
BitmapText &bt = *m_ptextKeys[r][x];
|
BitmapText &bt = *m_ptextKeys[r][x];
|
||||||
float fX = roundf( SCALE( x, 0, KEYS_PER_ROW-1, SCREEN_LEFT+100, SCREEN_RIGHT-100 ) );
|
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, SCREEN_CENTER_Y-30, SCREEN_BOTTOM-80 ) );
|
float fY = roundf( SCALE( r, 0, NUM_KEYBOARD_ROWS-1, ROW_START_Y, ROW_END_Y ) );
|
||||||
bt.SetXY( fX, fY );
|
bt.SetXY( fX, fY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "ScreenWithMenuElements.h"
|
#include "ScreenWithMenuElements.h"
|
||||||
#include "BitmapText.h"
|
#include "BitmapText.h"
|
||||||
#include "RageSound.h"
|
#include "RageSound.h"
|
||||||
|
#include "ThemeMetric.h"
|
||||||
|
|
||||||
enum KeyboardRow
|
enum KeyboardRow
|
||||||
{
|
{
|
||||||
@@ -84,6 +85,10 @@ protected:
|
|||||||
void PositionCursor();
|
void PositionCursor();
|
||||||
|
|
||||||
BitmapText *m_ptextKeys[NUM_KEYBOARD_ROWS][KEYS_PER_ROW];
|
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_sndType;
|
||||||
RageSound m_sndBackspace;
|
RageSound m_sndBackspace;
|
||||||
|
|||||||
Reference in New Issue
Block a user