[ScreenDebugOverlay] add PageStartX and PageSpacingX metrics. (The Y value is still hardcoded to SCREEN_TOP+20 for now, though.)

This commit is contained in:
AJ Kelly
2010-08-04 11:14:05 -05:00
parent 2e78328fd6
commit 7c52f7b3f2
2 changed files with 7 additions and 3 deletions
+5 -3
View File
@@ -43,6 +43,8 @@ static const ThemeMetric<float> LINE_START_Y ("ScreenDebugOverlay", "LineStartY
static const ThemeMetric<float> LINE_SPACING ("ScreenDebugOverlay", "LineSpacing");
static const ThemeMetric<float> LINE_BUTTON_X ("ScreenDebugOverlay", "LineButtonX");
static const ThemeMetric<float> LINE_FUNCTION_X ("ScreenDebugOverlay", "LineFunctionX");
static const ThemeMetric<float> PAGE_START_X ("ScreenDebugOverlay", "PageStartX");
static const ThemeMetric<float> PAGE_SPACING_X ("ScreenDebugOverlay", "PageSpacingX");
// self-registering debug lines
// We don't use SubscriptionManager, because we want to keep the line order.
@@ -258,10 +260,10 @@ void ScreenDebugOverlay::Init()
p->SetName( "PageText" );
p->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "page") );
LOAD_ALL_COMMANDS( p );
// todo: be able to set different values? -aj
p->SetXY( SCREEN_CENTER_X-100+iPage*100, SCREEN_TOP+20 );
// todo: Y value is still hardcoded. -aj
p->SetXY( PAGE_START_X+iPage*PAGE_SPACING_X, SCREEN_TOP+20 );
p->SetText( *s + " (" + sButton + ")" );
p->SetShadowLength( 1 );
//p->SetShadowLength( 1 );
m_vptextPages.push_back( p );
this->AddChild( p );
}