From 5367feb73f3634d0fc796351cbae07bf59cc7202 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 27 Feb 2007 01:25:38 +0000 Subject: [PATCH] ShowDifficultyMeters (note: this approach is not recommended for new code. It's better to control this stuff with Lua. This is just an interim before this stuff is moved over to Lua, since I don't want to spend time converting it right now.) --- stepmania/src/ScreenEvaluation.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 2c600f1bd3..d91b28c02c 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -56,6 +56,7 @@ XToString( StatLine ); // metrics that are specific to classes derived from ScreenEvaluation #define SHOW_BANNER_AREA THEME->GetMetricB(m_sName,"ShowBannerArea") #define SHOW_GRADE_AREA THEME->GetMetricB(m_sName,"ShowGradeArea") +#define SHOW_DIFFICULTY_METERS THEME->GetMetricB(m_sName,"ShowDifficultyMeters") #define SHOW_POINTS_AREA THEME->GetMetricB(m_sName,"ShowPointsArea") #define SHOW_BONUS_AREA THEME->GetMetricB(m_sName,"ShowBonusArea") #define SHOW_SURVIVED_AREA THEME->GetMetricB(m_sName,"ShowSurvivedArea") @@ -323,15 +324,18 @@ void ScreenEvaluation::Init() SET_XY( m_DifficultyIcon[p] ); this->AddChild( &m_DifficultyIcon[p] ); - m_DifficultyMeter[p].SetName( ssprintf("DifficultyMeterP%d",p+1) ); - m_DifficultyMeter[p].Load( ssprintf("ScreenEvaluation DifficultyMeterP%d",p+1) ); - if( GAMESTATE->IsCourseMode() ) - m_DifficultyMeter[p].SetFromTrail( GAMESTATE->m_pCurTrail[p] ); - else - m_DifficultyMeter[p].SetFromSteps( GAMESTATE->m_pCurSteps[p] ); - ActorUtil::LoadAllCommands( m_DifficultyMeter[p], m_sName ); - SET_XY( m_DifficultyMeter[p] ); - this->AddChild( &m_DifficultyMeter[p] ); + if( SHOW_DIFFICULTY_METERS ) + { + m_DifficultyMeter[p].SetName( ssprintf("DifficultyMeterP%d",p+1) ); + m_DifficultyMeter[p].Load( ssprintf("ScreenEvaluation DifficultyMeterP%d",p+1) ); + if( GAMESTATE->IsCourseMode() ) + m_DifficultyMeter[p].SetFromTrail( GAMESTATE->m_pCurTrail[p] ); + else + m_DifficultyMeter[p].SetFromSteps( GAMESTATE->m_pCurSteps[p] ); + ActorUtil::LoadAllCommands( m_DifficultyMeter[p], m_sName ); + SET_XY( m_DifficultyMeter[p] ); + this->AddChild( &m_DifficultyMeter[p] ); + } m_textPlayerOptions[p].LoadFromFont( THEME->GetPathF(m_sName,"PlayerOptions") ); m_textPlayerOptions[p].SetName( ssprintf("PlayerOptionsP%d",p+1) );