diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 4fc9a95835..d32e54c045 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -16,7 +16,8 @@ sm-ssc v1.0 Release Candidate 2 | 201007xx 20100630 -------- -* [ScreenDebugOverlay] add LineStartY, LineSpacing metrics +* [ScreenDebugOverlay] add new metrics: LineStartY, LineSpacing, + LineButtonX, LineFunctionX. 20100629 -------- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 5dd56ceb7b..791ed5512f 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1144,10 +1144,13 @@ LightsMode="LightsMode_MenuStartAndDirections" [ScreenDebugOverlay] Class="ScreenDebugOverlay" Fallback="Screen" + LineOnColor=color("1,1,1,1") LineOffColor=color("0.6,0.6,0.6,1") LineStartY=SCREEN_TOP+50 LineSpacing=16 +LineButtonX=SCREEN_CENTER_X-50 +LineFunctionX=SCREEN_CENTER_X-30 PageTextGainFocusCommand=diffuse,color("1,1,1,1") PageTextLoseFocusCommand=diffuse,color("0.6,0.6,0.6,1") diff --git a/src/ScreenDebugOverlay.cpp b/src/ScreenDebugOverlay.cpp index d35b6734c2..5ca94ce00b 100644 --- a/src/ScreenDebugOverlay.cpp +++ b/src/ScreenDebugOverlay.cpp @@ -39,8 +39,10 @@ static float g_fImageScaleDestination = 1; // DebugLine theming static const ThemeMetric LINE_ON_COLOR ("ScreenDebugOverlay", "LineOnColor"); static const ThemeMetric LINE_OFF_COLOR ("ScreenDebugOverlay", "LineOffColor"); -static const ThemeMetric DEBUG_LINE_START_Y ("ScreenDebugOverlay", "LineStartY"); -static const ThemeMetric DEBUG_LINE_SPACING ("ScreenDebugOverlay", "LineSpacing"); +static const ThemeMetric LINE_START_Y ("ScreenDebugOverlay", "LineStartY"); +static const ThemeMetric LINE_SPACING ("ScreenDebugOverlay", "LineSpacing"); +static const ThemeMetric LINE_BUTTON_X ("ScreenDebugOverlay", "LineButtonX"); +static const ThemeMetric LINE_FUNCTION_X ("ScreenDebugOverlay", "LineFunctionX"); // self-registering debug lines // We don't use SubscriptionManager, because we want to keep the line order. @@ -354,7 +356,7 @@ void ScreenDebugOverlay::UpdateText() int i = p-g_pvpSubscribers->begin(); //float fY = SCREEN_TOP+50 + iOffset * 16; - float fY = DEBUG_LINE_START_Y + iOffset * DEBUG_LINE_SPACING; + float fY = LINE_START_Y + iOffset * LINE_SPACING; BitmapText &txt1 = *m_vptextButton[i]; BitmapText &txt2 = *m_vptextFunction[i]; @@ -368,10 +370,10 @@ void ScreenDebugOverlay::UpdateText() txt2.SetVisible( true ); ++iOffset; - txt1.SetX( SCREEN_CENTER_X-50 ); + txt1.SetX( LINE_BUTTON_X ); txt1.SetY( fY ); - txt2.SetX( SCREEN_CENTER_X-30 ); + txt2.SetX( LINE_FUNCTION_X ); txt2.SetY( fY ); RString s1 = (*p)->GetDisplayTitle();