FeetPerDifficulty -> AutoColorFeet

This commit is contained in:
Chris Danford
2005-04-13 10:49:59 +00:00
parent 04715f4dd3
commit f9220d1b2b
2 changed files with 10 additions and 5 deletions
+9 -4
View File
@@ -59,21 +59,24 @@ void DifficultyMeter::Load( const CString &sType )
m_bShowDifficulty.Load(sType,"ShowDifficulty"); m_bShowDifficulty.Load(sType,"ShowDifficulty");
m_bShowMeter.Load(sType,"ShowMeter"); m_bShowMeter.Load(sType,"ShowMeter");
m_bShowEditDescription.Load(sType,"ShowEditDescription"); m_bShowEditDescription.Load(sType,"ShowEditDescription");
m_bFeetPerDifficulty.Load(sType,"FeetPerDifficulty"); m_bAutoColorFeet.Load(sType,"AutoColorFeet");
if( m_bShowFeet ) if( m_bShowFeet )
{ {
m_textFeet.SetName( "Feet" ); m_textFeet.SetName( "Feet" );
CString Feet; CString Feet;
if( m_bFeetPerDifficulty ) if( !m_bAutoColorFeet )
{ {
for( unsigned i = 0; i < NUM_DIFFICULTIES; ++i ) for( unsigned i = 0; i < NUM_DIFFICULTIES; ++i )
Feet += char(i + '0'); // 01234 Feet += char(i + '0'); // 01234
Feet += 'X'; // Off Feet += 'X'; // Off
} }
else else
{
Feet = "0X"; Feet = "0X";
m_textFeet.LoadFromTextureAndChars( THEME->GetPathG(sType,"bar"), Feet ); }
int iNumFrames = m_bAutoColorFeet ? 2 : NUM_DIFFICULTIES+1;
m_textFeet.LoadFromTextureAndChars( THEME->GetPathG(sType,ssprintf("bar %dx1",iNumFrames)), Feet );
ActorUtil::SetXYAndOnCommand( m_textFeet, sType ); ActorUtil::SetXYAndOnCommand( m_textFeet, sType );
this->AddChild( &m_textFeet ); this->AddChild( &m_textFeet );
} }
@@ -192,7 +195,7 @@ void DifficultyMeter::SetInternal( int iMeter, Difficulty dc, const CString &sDi
{ {
char on = '0'; char on = '0';
char off = 'X'; char off = 'X';
if( m_bFeetPerDifficulty ) if( !m_bAutoColorFeet )
on = char(dc + '0'); on = char(dc + '0');
CString sNewText; CString sNewText;
@@ -202,6 +205,8 @@ void DifficultyMeter::SetInternal( int iMeter, Difficulty dc, const CString &sDi
sNewText.insert( sNewText.end(), iNumOff, off ); sNewText.insert( sNewText.end(), iNumOff, off );
m_textFeet.SetText( sNewText ); m_textFeet.SetText( sNewText );
if( m_bAutoColorFeet )
m_textFeet.SetDiffuse( SONGMAN->GetDifficultyColor(dc) );
if( iMeter > m_iGlowIfMeterGreaterThan ) if( iMeter > m_iGlowIfMeterGreaterThan )
m_textFeet.SetEffectGlowShift(); m_textFeet.SetEffectGlowShift();
+1 -1
View File
@@ -81,7 +81,7 @@ private:
ThemeMetric<bool> m_bShowDifficulty; ThemeMetric<bool> m_bShowDifficulty;
ThemeMetric<bool> m_bShowMeter; ThemeMetric<bool> m_bShowMeter;
ThemeMetric<bool> m_bShowEditDescription; ThemeMetric<bool> m_bShowEditDescription;
ThemeMetric<bool> m_bFeetPerDifficulty; ThemeMetric<bool> m_bAutoColorFeet;
}; };
#endif #endif