From c013c78577d7dc27ee89bb0855959d6861c72ea1 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 13 Apr 2005 11:22:34 +0000 Subject: [PATCH] remove EditMenu's textMeter and use the one in DifficultyMeter instead --- stepmania/Themes/default/metrics.ini | 30 +++++++++++++++++++++++----- stepmania/src/DifficultyMeter.cpp | 3 ++- stepmania/src/DifficultyMeter.h | 1 + stepmania/src/EditMenu.cpp | 28 -------------------------- stepmania/src/EditMenu.h | 2 -- 5 files changed, 28 insertions(+), 36 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index ce1299c456..b3ab7c0424 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -2360,24 +2360,43 @@ GlowIfMeterGreaterThan=9 FeetX=0 FeetY=0 FeetOnCommand=shadowlength,2 -FeetIsDifficultyColor=1 +AutoColorFeet=1 ShowFeet=1 ShowDifficulty=0 ShowMeter=0 -FeetPerDifficulty=0 +ShowEditDescription=0 +ZeroMeterString=? [EditDifficultyMeter] +Fallback=DifficultyMeter NumFeetInMeter=10 MaxFeetInMeter=14 GlowIfMeterGreaterThan=9 FeetX=0 FeetY=0 FeetOnCommand=shadowlength,2 -FeetIsDifficultyColor=1 +AutoColorFeet=1 ShowFeet=1 ShowDifficulty=0 -ShowMeter=0 -FeetPerDifficulty=0 +ShowMeter=1 +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] 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 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 +AvoidMineCommand= HitMineCommand= [BPMDisplay] diff --git a/stepmania/src/DifficultyMeter.cpp b/stepmania/src/DifficultyMeter.cpp index eae2b7c1ba..28befc8870 100644 --- a/stepmania/src/DifficultyMeter.cpp +++ b/stepmania/src/DifficultyMeter.cpp @@ -60,6 +60,7 @@ void DifficultyMeter::Load( const CString &sType ) m_bShowMeter.Load(sType,"ShowMeter"); m_bShowEditDescription.Load(sType,"ShowEditDescription"); m_bAutoColorFeet.Load(sType,"AutoColorFeet"); + m_sZeroMeterString.Load(sType,"ZeroMeterString"); if( m_bShowFeet ) { @@ -218,7 +219,7 @@ void DifficultyMeter::SetInternal( int iMeter, Difficulty dc, const CString &sDi { if( iMeter == 0 ) // Unset calls with this { - m_textMeter.SetText( "x" ); + m_textMeter.SetText( m_sZeroMeterString ); } else { diff --git a/stepmania/src/DifficultyMeter.h b/stepmania/src/DifficultyMeter.h index 6ac414e827..18be970aca 100644 --- a/stepmania/src/DifficultyMeter.h +++ b/stepmania/src/DifficultyMeter.h @@ -82,6 +82,7 @@ private: ThemeMetric m_bShowMeter; ThemeMetric m_bShowEditDescription; ThemeMetric m_bAutoColorFeet; + ThemeMetric m_sZeroMeterString; }; #endif diff --git a/stepmania/src/EditMenu.cpp b/stepmania/src/EditMenu.cpp index b8b6ca07b3..f10c91d623 100644 --- a/stepmania/src/EditMenu.cpp +++ b/stepmania/src/EditMenu.cpp @@ -142,16 +142,6 @@ EditMenu::EditMenu() SET_XY( 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_soundChangeValue.Load( THEME->GetPathS("EditMenu","value") ); @@ -407,17 +397,9 @@ void EditMenu::OnRowValueChanged( EditMenuRow row ) m_textValue[ROW_STEPS].SetText( s ); } if( GetSelectedSteps() ) - { m_Meter.SetFromSteps( GetSelectedSteps() ); - m_textMeter.SetText( ssprintf("%d", GetSelectedSteps()->GetMeter()) ); - m_textMeter.SetDiffuse( SONGMAN->GetDifficultyColor( GetSelectedSteps()->GetDifficulty() ) ); - } else - { m_Meter.SetFromMeterAndDifficulty( 0, GetSelectedDifficulty() ); - m_textMeter.SetText( ssprintf("%d", 0) ); - } - m_textMeter.SetHidden( GetSelectedSteps()? false:true ); // fall through case ROW_SOURCE_STEPS_TYPE: m_textLabel[ROW_SOURCE_STEPS_TYPE].SetHidden( GetSelectedSteps() ? true : false ); @@ -468,22 +450,12 @@ void EditMenu::OnRowValueChanged( EditMenuRow row ) } bool bHideMeter = false; if( GetSelectedSourceDifficulty() == DIFFICULTY_INVALID ) - { bHideMeter = true; - } else if( GetSelectedSourceSteps() ) - { m_SourceMeter.SetFromSteps( GetSelectedSourceSteps() ); - m_textSourceMeter.SetText( ssprintf("%d", GetSelectedSourceSteps()->GetMeter()) ); - m_textSourceMeter.SetDiffuse( SONGMAN->GetDifficultyColor( GetSelectedSourceSteps()->GetDifficulty() ) ); - } else - { m_SourceMeter.SetFromMeterAndDifficulty( 0, GetSelectedSourceDifficulty() ); - m_textSourceMeter.SetText( ssprintf("%d", 0) ); - } m_SourceMeter.SetHidden( (bHideMeter || GetSelectedSteps()) ); - m_textSourceMeter.SetHidden( bHideMeter || !(GetSelectedSteps() == false && GetSelectedSourceSteps()) ); m_Actions.clear(); if( GetSelectedSteps() ) diff --git a/stepmania/src/EditMenu.h b/stepmania/src/EditMenu.h index f7e73503f1..d3f5d61583 100644 --- a/stepmania/src/EditMenu.h +++ b/stepmania/src/EditMenu.h @@ -86,8 +86,6 @@ private: TextBanner m_SongTextBanner; DifficultyMeter m_Meter; DifficultyMeter m_SourceMeter; - BitmapText m_textMeter; - BitmapText m_textSourceMeter; vector m_vDifficulties;