[ScreenDebugOverlay] add LineStartY, LineSpacing metrics
This commit is contained in:
@@ -14,6 +14,10 @@ sm-ssc v1.0 Release Candidate 2 | 201007xx
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
(work in progress, it's not out yet [hence the "xx" above].)
|
(work in progress, it's not out yet [hence the "xx" above].)
|
||||||
|
|
||||||
|
20100630
|
||||||
|
--------
|
||||||
|
* [ScreenDebugOverlay] add LineStartY, LineSpacing metrics
|
||||||
|
|
||||||
20100629
|
20100629
|
||||||
--------
|
--------
|
||||||
* Fix an issue involving setting a group via GameCommand and a metric ([MusicWheel]
|
* Fix an issue involving setting a group via GameCommand and a metric ([MusicWheel]
|
||||||
|
|||||||
@@ -1146,6 +1146,8 @@ Class="ScreenDebugOverlay"
|
|||||||
Fallback="Screen"
|
Fallback="Screen"
|
||||||
LineOnColor=color("1,1,1,1")
|
LineOnColor=color("1,1,1,1")
|
||||||
LineOffColor=color("0.6,0.6,0.6,1")
|
LineOffColor=color("0.6,0.6,0.6,1")
|
||||||
|
LineStartY=SCREEN_TOP+50
|
||||||
|
LineSpacing=16
|
||||||
|
|
||||||
PageTextGainFocusCommand=diffuse,color("1,1,1,1")
|
PageTextGainFocusCommand=diffuse,color("1,1,1,1")
|
||||||
PageTextLoseFocusCommand=diffuse,color("0.6,0.6,0.6,1")
|
PageTextLoseFocusCommand=diffuse,color("0.6,0.6,0.6,1")
|
||||||
|
|||||||
@@ -36,9 +36,11 @@ static RageTimer g_HaltTimer(RageZeroTimer);
|
|||||||
static float g_fImageScaleCurrent = 1;
|
static float g_fImageScaleCurrent = 1;
|
||||||
static float g_fImageScaleDestination = 1;
|
static float g_fImageScaleDestination = 1;
|
||||||
|
|
||||||
// colors
|
// DebugLine theming
|
||||||
static const ThemeMetric<RageColor> LINE_ON_COLOR ("ScreenDebugOverlay", "LineOnColor");
|
static const ThemeMetric<RageColor> LINE_ON_COLOR ("ScreenDebugOverlay", "LineOnColor");
|
||||||
static const ThemeMetric<RageColor> LINE_OFF_COLOR ("ScreenDebugOverlay", "LineOffColor");
|
static const ThemeMetric<RageColor> LINE_OFF_COLOR ("ScreenDebugOverlay", "LineOffColor");
|
||||||
|
static const ThemeMetric<float> DEBUG_LINE_START_Y ("ScreenDebugOverlay", "LineStartY");
|
||||||
|
static const ThemeMetric<float> DEBUG_LINE_SPACING ("ScreenDebugOverlay", "LineSpacing");
|
||||||
|
|
||||||
// self-registering debug lines
|
// self-registering debug lines
|
||||||
// We don't use SubscriptionManager, because we want to keep the line order.
|
// We don't use SubscriptionManager, because we want to keep the line order.
|
||||||
@@ -337,17 +339,9 @@ void ScreenDebugOverlay::Update( float fDeltaTime )
|
|||||||
|
|
||||||
void ScreenDebugOverlay::UpdateText()
|
void ScreenDebugOverlay::UpdateText()
|
||||||
{
|
{
|
||||||
/* Highlight options that aren't the default. */
|
|
||||||
// xxx: convert these into metrics? -aj
|
|
||||||
/*
|
|
||||||
const RageColor off(0.7f, 0.7f, 0.7f, 1.0f);
|
|
||||||
const RageColor on(1, 1, 1, 1);
|
|
||||||
*/
|
|
||||||
|
|
||||||
FOREACH_CONST( RString, m_asPages, s )
|
FOREACH_CONST( RString, m_asPages, s )
|
||||||
{
|
{
|
||||||
int iPage = s - m_asPages.begin();
|
int iPage = s - m_asPages.begin();
|
||||||
//m_vptextPages[iPage]->SetDiffuse( (iPage == m_iCurrentPage) ? on : off );
|
|
||||||
m_vptextPages[iPage]->PlayCommand( (iPage == m_iCurrentPage) ? "GainFocus" : "LoseFocus" );
|
m_vptextPages[iPage]->PlayCommand( (iPage == m_iCurrentPage) ? "GainFocus" : "LoseFocus" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,7 +353,8 @@ void ScreenDebugOverlay::UpdateText()
|
|||||||
|
|
||||||
int i = p-g_pvpSubscribers->begin();
|
int i = p-g_pvpSubscribers->begin();
|
||||||
|
|
||||||
float fY = SCREEN_TOP+50 + iOffset * 16;
|
//float fY = SCREEN_TOP+50 + iOffset * 16;
|
||||||
|
float fY = DEBUG_LINE_START_Y + iOffset * DEBUG_LINE_SPACING;
|
||||||
|
|
||||||
BitmapText &txt1 = *m_vptextButton[i];
|
BitmapText &txt1 = *m_vptextButton[i];
|
||||||
BitmapText &txt2 = *m_vptextFunction[i];
|
BitmapText &txt2 = *m_vptextFunction[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user