From 2fab068fe49f14e5080d66484a6f5d65ec53b648 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 29 May 2004 04:55:00 +0000 Subject: [PATCH] fix DifficultyList colors not properly set when scrolling over Roulette --- stepmania/src/DifficultyList.cpp | 9 +++++++-- stepmania/src/DifficultyMeter.cpp | 12 ++++++------ stepmania/src/DifficultyMeter.h | 7 ++++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/stepmania/src/DifficultyList.cpp b/stepmania/src/DifficultyList.cpp index 3ad9a8ab1a..78436ffe71 100644 --- a/stepmania/src/DifficultyList.cpp +++ b/stepmania/src/DifficultyList.cpp @@ -299,9 +299,14 @@ void DifficultyList::SetFromGameState() row.m_dc = d; - m_Lines[i].m_Meter.SetMeter( 3*(d), d ); - m_Lines[i].m_Number.SetText( "?" ); + m_Lines[i].m_Meter.SetFromMeterAndDifficulty( 3*(d), d ); + m_Lines[i].m_Description.SetText( GetDifficultyString(d) ); + m_Lines[i].m_Description.SetDiffuseColor( SONGMAN->GetDifficultyColor(d) ); + + m_Lines[i].m_Number.SetZoomX(1); + m_Lines[i].m_Number.SetDiffuseColor( SONGMAN->GetDifficultyColor(d) ); + m_Lines[i].m_Number.SetText( "?" ); } } else diff --git a/stepmania/src/DifficultyMeter.cpp b/stepmania/src/DifficultyMeter.cpp index a7f0125af6..1be880de4d 100644 --- a/stepmania/src/DifficultyMeter.cpp +++ b/stepmania/src/DifficultyMeter.cpp @@ -106,7 +106,7 @@ void DifficultyMeter::SetFromSteps( const Steps* pSteps ) return; } - SetMeter( pSteps->GetMeter(), pSteps->GetDifficulty() ); + SetFromMeterAndDifficulty( pSteps->GetMeter(), pSteps->GetDifficulty() ); SetDifficulty( DifficultyToString( pSteps->GetDifficulty() ) ); } @@ -135,7 +135,7 @@ void DifficultyMeter::SetFromCourse( const Course* pCourse, PlayerNumber pn ) else FakeDifficulty = DIFFICULTY_CHALLENGE; - SetMeter( meter, FakeDifficulty ); + SetFromMeterAndDifficulty( meter, FakeDifficulty ); SetDifficulty( DifficultyToString(FakeDifficulty) + "Course" ); } @@ -144,7 +144,7 @@ void DifficultyMeter::Unset() m_textFeet.SetEffectNone(); if( FEET_IS_DIFFICULTY_COLOR ) m_textFeet.SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) ); - SetMeter( 0, DIFFICULTY_BEGINNER ); + SetFromMeterAndDifficulty( 0, DIFFICULTY_BEGINNER ); SetDifficulty( "None" ); } @@ -153,7 +153,7 @@ void DifficultyMeter::SetFromDifficulty( Difficulty dc ) m_textFeet.SetEffectNone(); if( FEET_IS_DIFFICULTY_COLOR ) m_textFeet.SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) ); - SetMeter( 0, DIFFICULTY_BEGINNER ); + SetFromMeterAndDifficulty( 0, DIFFICULTY_BEGINNER ); SetDifficulty( DifficultyToString( dc ) ); } @@ -162,7 +162,7 @@ void DifficultyMeter::SetFromCourseDifficulty( CourseDifficulty cd ) m_textFeet.SetEffectNone(); if( FEET_IS_DIFFICULTY_COLOR ) m_textFeet.SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) ); - SetMeter( 0, DIFFICULTY_BEGINNER ); + SetFromMeterAndDifficulty( 0, DIFFICULTY_BEGINNER ); SetDifficulty( CourseDifficultyToString( cd ) ); } @@ -186,7 +186,7 @@ void DifficultyMeter::SetFromGameState( PlayerNumber pn ) } } -void DifficultyMeter::SetMeter( int iMeter, Difficulty dc ) +void DifficultyMeter::SetFromMeterAndDifficulty( int iMeter, Difficulty dc ) { if( SHOW_FEET ) { diff --git a/stepmania/src/DifficultyMeter.h b/stepmania/src/DifficultyMeter.h index 8a336d9b6d..4cb522b329 100644 --- a/stepmania/src/DifficultyMeter.h +++ b/stepmania/src/DifficultyMeter.h @@ -28,14 +28,15 @@ public: void Load(); void SetFromGameState( PlayerNumber pn ); - void SetFromDifficulty( Difficulty dc ); - void SetFromCourseDifficulty( CourseDifficulty cd ); + void SetFromMeterAndDifficulty( int iMeter, Difficulty dc ); void SetFromSteps( const Steps* pSteps ); void SetFromCourse( const Course* pCourse, PlayerNumber pn ); void Unset(); - void SetMeter( int iMeter, Difficulty dc ); private: + void SetFromDifficulty( Difficulty dc ); + void SetFromCourseDifficulty( CourseDifficulty cd ); + void SetDifficulty( CString diff ); BitmapText m_textFeet;