use GetMetricR
This commit is contained in:
@@ -15,8 +15,6 @@ RString WARNING_COMMAND_NAME( size_t i ) { return ssprintf("WarningCommand%d",in
|
|||||||
static const ThemeMetric<int> WARNING_START ("MenuTimer","WarningStart");
|
static const ThemeMetric<int> WARNING_START ("MenuTimer","WarningStart");
|
||||||
static const ThemeMetric<int> WARNING_BEEP_START ("MenuTimer","WarningBeepStart");
|
static const ThemeMetric<int> WARNING_BEEP_START ("MenuTimer","WarningBeepStart");
|
||||||
static const ThemeMetric<float> MAX_STALL_SECONDS ("MenuTimer","MaxStallSeconds");
|
static const ThemeMetric<float> MAX_STALL_SECONDS ("MenuTimer","MaxStallSeconds");
|
||||||
static const ThemeMetric<RString> TEXT1_FORMAT_FUNCTION ("MenuTimer","Text1FormatFunction");
|
|
||||||
static const ThemeMetric<RString> TEXT2_FORMAT_FUNCTION ("MenuTimer","Text2FormatFunction");
|
|
||||||
|
|
||||||
static const float TIMER_PAUSE_SECONDS = 99.99f;
|
static const float TIMER_PAUSE_SECONDS = 99.99f;
|
||||||
|
|
||||||
@@ -36,10 +34,11 @@ void MenuTimer::Load()
|
|||||||
m_text[i].SetName( ssprintf("Text%d",i+1) );
|
m_text[i].SetName( ssprintf("Text%d",i+1) );
|
||||||
ActorUtil::OnCommand( m_text[i], "MenuTimer" );
|
ActorUtil::OnCommand( m_text[i], "MenuTimer" );
|
||||||
this->AddChild( &m_text[i] );
|
this->AddChild( &m_text[i] );
|
||||||
|
|
||||||
m_exprFormatText[i].SetFromExpression( i==0 ? TEXT1_FORMAT_FUNCTION : TEXT2_FORMAT_FUNCTION );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_exprFormatText[0] = THEME->GetMetricR("MenuTimer", "Text1FormatFunction");
|
||||||
|
m_exprFormatText[1] = THEME->GetMetricR("MenuTimer", "Text2FormatFunction");
|
||||||
|
|
||||||
SetSeconds( TIMER_PAUSE_SECONDS );
|
SetSeconds( TIMER_PAUSE_SECONDS );
|
||||||
|
|
||||||
m_soundBeep.Load( THEME->GetPathS("MenuTimer","tick") );
|
m_soundBeep.Load( THEME->GetPathS("MenuTimer","tick") );
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ void ScreenOptions::Init()
|
|||||||
CURSOR_TWEEN_SECONDS.Load( m_sName, "CursorTweenSeconds" );
|
CURSOR_TWEEN_SECONDS.Load( m_sName, "CursorTweenSeconds" );
|
||||||
WRAP_VALUE_IN_ROW.Load( m_sName, "WrapValueInRow" );
|
WRAP_VALUE_IN_ROW.Load( m_sName, "WrapValueInRow" );
|
||||||
|
|
||||||
m_exprRowPositionTransformFunction.SetFromExpression( THEME->GetMetric(m_sName,"RowPositionTransformFunction") );
|
m_exprRowPositionTransformFunction.SetFromReference( THEME->GetMetricR(m_sName,"RowPositionTransformFunction") );
|
||||||
|
|
||||||
ScreenWithMenuElements::Init();
|
ScreenWithMenuElements::Init();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user