remove EditMenu's textMeter and use the one in DifficultyMeter instead

This commit is contained in:
Chris Danford
2005-04-13 11:22:34 +00:00
parent f9220d1b2b
commit c013c78577
5 changed files with 28 additions and 36 deletions
+25 -5
View File
@@ -2360,24 +2360,43 @@ GlowIfMeterGreaterThan=9
FeetX=0 FeetX=0
FeetY=0 FeetY=0
FeetOnCommand=shadowlength,2 FeetOnCommand=shadowlength,2
FeetIsDifficultyColor=1 AutoColorFeet=1
ShowFeet=1 ShowFeet=1
ShowDifficulty=0 ShowDifficulty=0
ShowMeter=0 ShowMeter=0
FeetPerDifficulty=0 ShowEditDescription=0
ZeroMeterString=?
[EditDifficultyMeter] [EditDifficultyMeter]
Fallback=DifficultyMeter
NumFeetInMeter=10 NumFeetInMeter=10
MaxFeetInMeter=14 MaxFeetInMeter=14
GlowIfMeterGreaterThan=9 GlowIfMeterGreaterThan=9
FeetX=0 FeetX=0
FeetY=0 FeetY=0
FeetOnCommand=shadowlength,2 FeetOnCommand=shadowlength,2
FeetIsDifficultyColor=1 AutoColorFeet=1
ShowFeet=1 ShowFeet=1
ShowDifficulty=0 ShowDifficulty=0
ShowMeter=0 ShowMeter=1
FeetPerDifficulty=0 MeterX=-70
MeterY=0
MeterOnCommand=ShadowLength,2;zoom,0.7
MeterOffCommand=
MeterSetNoneCommand=
MeterSetBeginnerCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_BEGINNER)
MeterSetEasyCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_EASY)
MeterSetMediumCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_MEDIUM)
MeterSetHardCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_HARD)
MeterSetChallengeCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_CHALLENGE)
MeterSetEditCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_EDIT)
MeterSetBeginnerCourseCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_BEGINNER)
MeterSetEasyCourseCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_EASY)
MeterSetRegularCourseCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_MEDIUM)
MeterSetDifficultCourseCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_HARD)
MeterSetChallengeCourseCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_CHALLENGE)
MeterSetEditCourseCommand=@"diffuse,"..DifficultyColor(DIFFICULTY_EDIT)
ZeroMeterString=
[ScreenWithMenuElements] [ScreenWithMenuElements]
Fallback=Screen Fallback=Screen
@@ -2733,6 +2752,7 @@ GreatCommand=shadowlength,4;diffuse,.6,.9,0,1;zoom,2.4;linear,0.05;zoom,2;sleep,
GoodCommand=shadowlength,4;diffuse,0,1,1,1;zoom,2.2;linear,0.05;zoom,2;sleep,0.8;linear,0;diffusealpha,0 GoodCommand=shadowlength,4;diffuse,0,1,1,1;zoom,2.2;linear,0.05;zoom,2;sleep,0.8;linear,0;diffusealpha,0
BooCommand=shadowlength,4;diffuse,1,.1,1,1;zoom,2.0;vibrate;effectmagnitude,4,8,8;sleep,0.8;linear,0;diffusealpha,0 BooCommand=shadowlength,4;diffuse,1,.1,1,1;zoom,2.0;vibrate;effectmagnitude,4,8,8;sleep,0.8;linear,0;diffusealpha,0
MissCommand=shadowlength,4;diffuse,1,.3,0,1;zoom,2.0;y,-20;linear,0.8;y,20;sleep,0.8;linear,0;diffusealpha,0 MissCommand=shadowlength,4;diffuse,1,.3,0,1;zoom,2.0;y,-20;linear,0.8;y,20;sleep,0.8;linear,0;diffusealpha,0
AvoidMineCommand=
HitMineCommand= HitMineCommand=
[BPMDisplay] [BPMDisplay]
+2 -1
View File
@@ -60,6 +60,7 @@ void DifficultyMeter::Load( const CString &sType )
m_bShowMeter.Load(sType,"ShowMeter"); m_bShowMeter.Load(sType,"ShowMeter");
m_bShowEditDescription.Load(sType,"ShowEditDescription"); m_bShowEditDescription.Load(sType,"ShowEditDescription");
m_bAutoColorFeet.Load(sType,"AutoColorFeet"); m_bAutoColorFeet.Load(sType,"AutoColorFeet");
m_sZeroMeterString.Load(sType,"ZeroMeterString");
if( m_bShowFeet ) if( m_bShowFeet )
{ {
@@ -218,7 +219,7 @@ void DifficultyMeter::SetInternal( int iMeter, Difficulty dc, const CString &sDi
{ {
if( iMeter == 0 ) // Unset calls with this if( iMeter == 0 ) // Unset calls with this
{ {
m_textMeter.SetText( "x" ); m_textMeter.SetText( m_sZeroMeterString );
} }
else else
{ {
+1
View File
@@ -82,6 +82,7 @@ private:
ThemeMetric<bool> m_bShowMeter; ThemeMetric<bool> m_bShowMeter;
ThemeMetric<bool> m_bShowEditDescription; ThemeMetric<bool> m_bShowEditDescription;
ThemeMetric<bool> m_bAutoColorFeet; ThemeMetric<bool> m_bAutoColorFeet;
ThemeMetric<CString> m_sZeroMeterString;
}; };
#endif #endif
-28
View File
@@ -142,16 +142,6 @@ EditMenu::EditMenu()
SET_XY( m_SourceMeter ); SET_XY( m_SourceMeter );
this->AddChild( &m_SourceMeter ); this->AddChild( &m_SourceMeter );
m_textMeter.SetName( "MeterNumber" );
m_textMeter.LoadFromFont( THEME->GetPathF("EditMenu","meter") );
SET_XY_AND_ON_COMMAND( m_textMeter );
this->AddChild( &m_textMeter );
m_textSourceMeter.SetName( "SourceMeterNumber" );
m_textSourceMeter.LoadFromFont( THEME->GetPathF("EditMenu","meter") );
SET_XY_AND_ON_COMMAND( m_textSourceMeter );
this->AddChild( &m_textSourceMeter );
m_soundChangeRow.Load( THEME->GetPathS("EditMenu","row") ); m_soundChangeRow.Load( THEME->GetPathS("EditMenu","row") );
m_soundChangeValue.Load( THEME->GetPathS("EditMenu","value") ); m_soundChangeValue.Load( THEME->GetPathS("EditMenu","value") );
@@ -407,17 +397,9 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
m_textValue[ROW_STEPS].SetText( s ); m_textValue[ROW_STEPS].SetText( s );
} }
if( GetSelectedSteps() ) if( GetSelectedSteps() )
{
m_Meter.SetFromSteps( GetSelectedSteps() ); m_Meter.SetFromSteps( GetSelectedSteps() );
m_textMeter.SetText( ssprintf("%d", GetSelectedSteps()->GetMeter()) );
m_textMeter.SetDiffuse( SONGMAN->GetDifficultyColor( GetSelectedSteps()->GetDifficulty() ) );
}
else else
{
m_Meter.SetFromMeterAndDifficulty( 0, GetSelectedDifficulty() ); m_Meter.SetFromMeterAndDifficulty( 0, GetSelectedDifficulty() );
m_textMeter.SetText( ssprintf("%d", 0) );
}
m_textMeter.SetHidden( GetSelectedSteps()? false:true );
// fall through // fall through
case ROW_SOURCE_STEPS_TYPE: case ROW_SOURCE_STEPS_TYPE:
m_textLabel[ROW_SOURCE_STEPS_TYPE].SetHidden( GetSelectedSteps() ? true : false ); m_textLabel[ROW_SOURCE_STEPS_TYPE].SetHidden( GetSelectedSteps() ? true : false );
@@ -468,22 +450,12 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
} }
bool bHideMeter = false; bool bHideMeter = false;
if( GetSelectedSourceDifficulty() == DIFFICULTY_INVALID ) if( GetSelectedSourceDifficulty() == DIFFICULTY_INVALID )
{
bHideMeter = true; bHideMeter = true;
}
else if( GetSelectedSourceSteps() ) else if( GetSelectedSourceSteps() )
{
m_SourceMeter.SetFromSteps( GetSelectedSourceSteps() ); m_SourceMeter.SetFromSteps( GetSelectedSourceSteps() );
m_textSourceMeter.SetText( ssprintf("%d", GetSelectedSourceSteps()->GetMeter()) );
m_textSourceMeter.SetDiffuse( SONGMAN->GetDifficultyColor( GetSelectedSourceSteps()->GetDifficulty() ) );
}
else else
{
m_SourceMeter.SetFromMeterAndDifficulty( 0, GetSelectedSourceDifficulty() ); m_SourceMeter.SetFromMeterAndDifficulty( 0, GetSelectedSourceDifficulty() );
m_textSourceMeter.SetText( ssprintf("%d", 0) );
}
m_SourceMeter.SetHidden( (bHideMeter || GetSelectedSteps()) ); m_SourceMeter.SetHidden( (bHideMeter || GetSelectedSteps()) );
m_textSourceMeter.SetHidden( bHideMeter || !(GetSelectedSteps() == false && GetSelectedSourceSteps()) );
m_Actions.clear(); m_Actions.clear();
if( GetSelectedSteps() ) if( GetSelectedSteps() )
-2
View File
@@ -86,8 +86,6 @@ private:
TextBanner m_SongTextBanner; TextBanner m_SongTextBanner;
DifficultyMeter m_Meter; DifficultyMeter m_Meter;
DifficultyMeter m_SourceMeter; DifficultyMeter m_SourceMeter;
BitmapText m_textMeter;
BitmapText m_textSourceMeter;
vector<Difficulty> m_vDifficulties; vector<Difficulty> m_vDifficulties;