From 8f645645449317256279bfc97646196798b54142 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 14 Nov 2003 00:55:58 +0000 Subject: [PATCH] Revert; breaks theme tricks and it's not worth fixing ... --- stepmania/src/DifficultyMeter.cpp | 21 ++++++++------------- stepmania/src/DifficultyMeter.h | 4 +--- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/stepmania/src/DifficultyMeter.cpp b/stepmania/src/DifficultyMeter.cpp index f341474a72..4ca0d4e207 100644 --- a/stepmania/src/DifficultyMeter.cpp +++ b/stepmania/src/DifficultyMeter.cpp @@ -21,10 +21,6 @@ #include "SongManager.h" -// const int NUM_FEET_IN_METER = 10; -// const int MAX_FEET_IN_METER = 14; -// const int GLOW_IF_METER_GREATER_THAN = 9; - #define NUM_FEET_IN_METER THEME->GetMetricI("DifficultyMeter","NumFeetInMeter") #define MAX_FEET_IN_METER THEME->GetMetricI("DifficultyMeter","MaxFeetInMeter") #define GLOW_IF_METER_GREATER_THAN THEME->GetMetricI("DifficultyMeter","GlowIfMeterGreaterThan") @@ -32,8 +28,7 @@ DifficultyMeter::DifficultyMeter() { - m_Text.LoadFromTextureAndChars( THEME->GetPathToG("DifficultyMeter bar 2x1"), "10" ); - this->AddChild( &m_Text ); + BitmapText::LoadFromTextureAndChars( THEME->GetPathToG("DifficultyMeter bar 2x1"), "10" ); Unset(); } @@ -47,7 +42,7 @@ void DifficultyMeter::SetFromNotes( const Steps* pNotes ) } SetMeter( pNotes->GetMeter() ); - m_Text.SetDiffuse( SONGMAN->GetDifficultyColor(pNotes->GetDifficulty()) ); + SetDiffuse( SONGMAN->GetDifficultyColor(pNotes->GetDifficulty()) ); } void DifficultyMeter::SetFromCourse( const Course* pCourse ) @@ -73,13 +68,13 @@ void DifficultyMeter::SetFromCourse( const Course* pCourse ) c = SONGMAN->GetDifficultyColor( DIFFICULTY_HARD ); else c = SONGMAN->GetDifficultyColor( DIFFICULTY_CHALLENGE ); - m_Text.SetDiffuse( c ); + SetDiffuse( c ); } void DifficultyMeter::Unset() { - m_Text.SetEffectNone(); - m_Text.SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) ); + SetEffectNone(); + SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) ); SetMeter( 0 ); } @@ -103,10 +98,10 @@ void DifficultyMeter::SetMeter( int iMeter ) if( f GLOW_IF_METER_GREATER_THAN ) - m_Text.SetEffectGlowShift(); + SetEffectGlowShift(); else - m_Text.SetEffectNone(); + SetEffectNone(); } diff --git a/stepmania/src/DifficultyMeter.h b/stepmania/src/DifficultyMeter.h index f92ef18b7a..988d37e380 100644 --- a/stepmania/src/DifficultyMeter.h +++ b/stepmania/src/DifficultyMeter.h @@ -13,13 +13,12 @@ #include "BitmapText.h" #include "PlayerNumber.h" -#include "ActorFrame.h" class Steps; class Course; -class DifficultyMeter: public ActorFrame +class DifficultyMeter: public BitmapText { public: DifficultyMeter(); @@ -31,7 +30,6 @@ public: private: void SetMeter( int iMeter ); - BitmapText m_Text; }; #endif