Format -> FormatPercentScore

This commit is contained in:
Chris Danford
2008-08-18 02:08:04 +00:00
parent ca2ba49384
commit 2cbaaa4741
2 changed files with 8 additions and 8 deletions
+7 -7
View File
@@ -25,7 +25,7 @@ PercentageDisplay::PercentageDisplay()
m_bUseRemainder = false;
m_bApplyScoreDisplayOptions = false;
m_bAutoRefresh = false;
m_Format.SetFromExpression( "FormatPercentScore" );
m_FormatPercentScore.SetFromExpression( "FormatPercentScore" );
}
void PercentageDisplay::LoadFromNode( const XNode* pNode )
@@ -35,8 +35,8 @@ void PercentageDisplay::LoadFromNode( const XNode* pNode )
pNode->GetAttrValue( "AutoRefresh", m_bAutoRefresh );
{
Lua *L = LUA->Get();
if( pNode->PushAttrValue(L, "Format") )
m_Format.SetFromStack( L );
if( pNode->PushAttrValue(L, "FormatPercentScore") )
m_FormatPercentScore.SetFromStack( L );
else
lua_pop(L, 1);
LUA->Release(L);
@@ -77,12 +77,12 @@ void PercentageDisplay::Load( const PlayerState *pPlayerState, const PlayerStage
m_iDancePointsDigits = THEME->GetMetricI( sMetricsGroup, "DancePointsDigits" );
m_bUseRemainder = THEME->GetMetricB( sMetricsGroup, "PercentUseRemainder" );
m_bApplyScoreDisplayOptions = THEME->GetMetricB( sMetricsGroup, "ApplyScoreDisplayOptions" );
m_Format = THEME->GetMetricR( sMetricsGroup, "Format" );
m_FormatPercentScore = THEME->GetMetricR( sMetricsGroup, "Format" );
if( m_Format.IsNil() )
if( m_FormatPercentScore.IsNil() )
{
LOG->Trace( "Format is nil in [%s]. Defaulting to 'FormatPercentScore'.", sMetricsGroup.c_str() );
m_Format.SetFromExpression( "FormatPercentScore" );
m_FormatPercentScore.SetFromExpression( "FormatPercentScore" );
}
if( ShowDancePointsNotPercentage() )
@@ -171,7 +171,7 @@ void PercentageDisplay::Refresh()
else
{
Lua *L = LUA->Get();
m_Format.PushSelf( L );
m_FormatPercentScore.PushSelf( L );
ASSERT( !lua_isnil(L, -1) );
LuaHelpers::Push( L, fPercentDancePoints );
RString sError;
+1 -1
View File
@@ -42,7 +42,7 @@ private:
BitmapText m_textPercent;
BitmapText m_textPercentRemainder;
LuaReference m_Format;
LuaReference m_FormatPercentScore;
};
#endif