From 22215d7759b9997e82d4e6abae8295937fc4682e Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 7 Mar 2005 07:47:18 +0000 Subject: [PATCH] move HomeEditMode metric into CommonMetrics --- stepmania/src/CommonMetrics.cpp | 1 + stepmania/src/CommonMetrics.h | 1 + stepmania/src/EditMenu.cpp | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stepmania/src/CommonMetrics.cpp b/stepmania/src/CommonMetrics.cpp index b02f6121d5..0ac4ec256c 100644 --- a/stepmania/src/CommonMetrics.cpp +++ b/stepmania/src/CommonMetrics.cpp @@ -14,6 +14,7 @@ ThemeMetric COURSE_DIFFICULTIES_TO_SHOW ("Common","CourseDifficultiesTo ThemeMetric1D PLAYER_COLOR ("Common",PLAYER_COLOR_NAME,NUM_PLAYERS); ThemeMetric JOIN_PAUSE_SECONDS ("Common","JoinPauseSeconds"); ThemeMetric WINDOW_TITLE ("Common","WindowTitle"); +ThemeMetric HOME_EDIT_MODE ("Common","HomeEditMode"); /* diff --git a/stepmania/src/CommonMetrics.h b/stepmania/src/CommonMetrics.h index 1b22a07297..ed85c8eaa7 100644 --- a/stepmania/src/CommonMetrics.h +++ b/stepmania/src/CommonMetrics.h @@ -15,6 +15,7 @@ extern ThemeMetric COURSE_DIFFICULTIES_TO_SHOW; extern ThemeMetric1D PLAYER_COLOR; extern ThemeMetric JOIN_PAUSE_SECONDS; extern ThemeMetric WINDOW_TITLE; +extern ThemeMetric HOME_EDIT_MODE; #endif diff --git a/stepmania/src/EditMenu.cpp b/stepmania/src/EditMenu.cpp index 63249fbb46..f069ff2bac 100644 --- a/stepmania/src/EditMenu.cpp +++ b/stepmania/src/EditMenu.cpp @@ -9,8 +9,8 @@ #include "song.h" #include "StepsUtil.h" #include "Foreach.h" +#include "CommonMetrics.h" -#define ONLY_ALLOW_EDITS THEME->GetMetricF("EditMenu","OnlyAllowEdits") #define ARROWS_X( i ) THEME->GetMetricF("EditMenu",ssprintf("Arrows%dX",i+1)) #define SONG_BANNER_X THEME->GetMetricF("EditMenu","SongBannerX") #define SONG_BANNER_Y THEME->GetMetricF("EditMenu","SongBannerY") @@ -97,7 +97,7 @@ EditMenu::EditMenu() // fill in data structures SONGMAN->GetGroupNames( m_sGroups ); GAMEMAN->GetStepsTypesForGame( GAMESTATE->m_pCurGame, m_StepsTypes ); - if( ONLY_ALLOW_EDITS ) + if( HOME_EDIT_MODE ) { m_vDifficulties.push_back( DIFFICULTY_EDIT ); } @@ -315,7 +315,7 @@ void EditMenu::OnRowValueChanged( Row row ) s = DifficultyToThemedString(GetSelectedDifficulty()); // UGLY. "Edit" -> "New Edit" - if( ONLY_ALLOW_EDITS ) + if( HOME_EDIT_MODE ) s = "New " + s; } m_textValue[ROW_STEPS].SetText( s );