diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 9f423eacd6..8cfd8c6401 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -14,6 +14,7 @@ StepMania 5.0 alpha 2 | 20120??? * [MemoryCardManager] Disable Memory Cards by default. If you want to use them, set MemoryCards=1 in Save/Preferences.ini (or Save/Static.ini). [AJ] * [GameState] Set Premium to Premium_DoubleFor1Credit by default. [AJ] +* [ScreenSelectMusic] Added PlaySoundOnEnteringOptionsMenu metric. [AJ] StepMania 5.0 alpha 1a | 20120219 -------------------------------------------------------------------------------- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index af68f1e940..e95e4f8d90 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -2014,6 +2014,7 @@ SelectMenuAvailable=false ModeMenuAvailable=true # ShowOptionsMessageSeconds=1.5 +PlaySoundOnEnteringOptionsMenu=true # ScreenModsCommand=setupmusicstagemods # diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index 76e22808d7..ca13e7acfc 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -94,6 +94,7 @@ void ScreenSelectMusic::Init() TWO_PART_TIMER_SECONDS.Load( m_sName, "TwoPartTimerSeconds" ); WRAP_CHANGE_STEPS.Load( m_sName, "WrapChangeSteps" ); NULL_SCORE_STRING.Load( m_sName, "NullScoreString" ); + PLAY_SOUND_ON_ENTERING_OPTIONS_MENU.Load( m_sName, "PlaySoundOnEnteringOptionsMenu" ); // To allow changing steps with gamebuttons -DaisuMaster CHANGE_STEPS_WITH_GAME_BUTTONS.Load( m_sName, "ChangeStepsWithGameButtons" ); CHANGE_GROUPS_WITH_GAME_BUTTONS.Load( m_sName, "ChangeGroupsWithGameButtons" ); @@ -437,7 +438,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) } m_bGoToOptions = true; - m_soundStart.Play(); + if( PLAY_SOUND_ON_ENTERING_OPTIONS_MENU ) + m_soundStart.Play(); this->PlayCommand( "ShowEnteringOptions" ); // Re-queue SM_BeginFadingOut, since ShowEnteringOptions may have diff --git a/src/ScreenSelectMusic.h b/src/ScreenSelectMusic.h index 3f64ecc505..aa2e9465d6 100644 --- a/src/ScreenSelectMusic.h +++ b/src/ScreenSelectMusic.h @@ -97,6 +97,7 @@ protected: ThemeMetric CHANGE_STEPS_WITH_GAME_BUTTONS; ThemeMetric CHANGE_GROUPS_WITH_GAME_BUTTONS; ThemeMetric NULL_SCORE_STRING; + ThemeMetric PLAY_SOUND_ON_ENTERING_OPTIONS_MENU; bool CanChangeSong() const { return m_SelectionState == SelectionState_SelectingSong; } bool CanChangeSteps() const { return TWO_PART_SELECTION ? m_SelectionState == SelectionState_SelectingSteps : m_SelectionState == SelectionState_SelectingSong; }