diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index 37529c47f4..a1b64cb4b8 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -8,6 +8,7 @@ #include "GameState.h" #include "FontCharAliases.h" #include "OptionRowHandler.h" +#include "PrefsManager.h" AutoScreenMessage( SM_GoToOK ) AutoScreenMessage( SM_GoToCancel ) @@ -45,6 +46,14 @@ void ScreenMiniMenu::MiniMenu( const MenuDef* pDef, ScreenMessage SM_SendOnOK, S REGISTER_SCREEN_CLASS( ScreenMiniMenu ); +void ScreenMiniMenu::Init() +{ + if( PREFSMAN->m_bArcadeOptionsNavigation ) + SetNavigation( NAV_THREE_KEY_MENU ); + + ScreenOptions::Init(); +} + void ScreenMiniMenu::BeginScreen() { ASSERT( g_pMenuDef != NULL ); @@ -138,6 +147,11 @@ void ScreenMiniMenu::HandleScreenMessage( const ScreenMessage SM ) ScreenOptions::HandleScreenMessage( SM ); } +bool ScreenMiniMenu::FocusedItemEndsScreen( PlayerNumber pn ) const +{ + return true; +} + /* * (c) 2003-2004 Chris Danford diff --git a/stepmania/src/ScreenMiniMenu.h b/stepmania/src/ScreenMiniMenu.h index 6810fc3c6a..045b8ece33 100644 --- a/stepmania/src/ScreenMiniMenu.h +++ b/stepmania/src/ScreenMiniMenu.h @@ -91,6 +91,7 @@ class ScreenMiniMenu : public ScreenOptions public: static void MiniMenu( const MenuDef* pDef, ScreenMessage smSendOnOK, ScreenMessage smSendOnCancel = SM_None, float fX = 0, float fY = 0 ); + void Init(); void BeginScreen(); void HandleScreenMessage( const ScreenMessage SM ); @@ -99,6 +100,8 @@ protected: virtual void ImportOptions( int iRow, const vector &vpns ); virtual void ExportOptions( int iRow, const vector &vpns ); + virtual bool FocusedItemEndsScreen( PlayerNumber pn ) const; + void LoadMenu( const MenuDef* pDef ); ScreenMessage m_SMSendOnOK; diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 85364c6b7e..a82ca0cdbc 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -528,7 +528,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) return; /* already transitioning */ /* If the selected option sets a screen, honor it. */ - RString sThisScreen = GetNextScreenForSelection( GAMESTATE->m_MasterPlayerNumber ); + RString sThisScreen = GetNextScreenForFocusedItem( GAMESTATE->m_MasterPlayerNumber ); if( sThisScreen != "" ) m_sNextScreen = sThisScreen; @@ -813,8 +813,7 @@ void ScreenOptions::ProcessMenuStart( const InputEventPlus &input ) { /* In NAV_THREE_KEY_MENU mode, if a row doesn't set a screen, it does * something. Apply it now, and don't go to the next screen. */ - RString sScreen = GetNextScreenForSelection( input.pn ); - if( sScreen.empty() ) + if( !FocusedItemEndsScreen(input.pn) ) { vector vpns; vpns.push_back( input.pn ); @@ -938,7 +937,13 @@ void ScreenOptions::StoreFocus( PlayerNumber pn ) m_iCurrentRow[pn], row.GetChoiceInRowWithFocus(pn), m_iFocusX[pn]); } -RString ScreenOptions::GetNextScreenForSelection( PlayerNumber pn ) const +bool ScreenOptions::FocusedItemEndsScreen( PlayerNumber pn ) const +{ + RString sScreen = GetNextScreenForFocusedItem( pn ); + return !sScreen.empty(); +} + +RString ScreenOptions::GetNextScreenForFocusedItem( PlayerNumber pn ) const { int iCurRow = this->GetCurrentRow( pn ); @@ -1192,6 +1197,16 @@ bool ScreenOptions::MoveRowAbsolute( PlayerNumber pn, int iRow ) return bChanged; } +void ScreenOptions::MenuLeft( const InputEventPlus &input ) +{ + ChangeValueInRowRelative(m_iCurrentRow[input.pn],input.pn,-1, input.type != IET_FIRST_PRESS); +} + +void ScreenOptions::MenuRight( const InputEventPlus &input ) +{ + ChangeValueInRowRelative(m_iCurrentRow[input.pn], input.pn,+1, input.type != IET_FIRST_PRESS); +} + void ScreenOptions::MenuUp( const InputEventPlus &input ) { MenuUpDown( input, -1 ); diff --git a/stepmania/src/ScreenOptions.h b/stepmania/src/ScreenOptions.h index 3ccccc234d..caf6e2bcd8 100644 --- a/stepmania/src/ScreenOptions.h +++ b/stepmania/src/ScreenOptions.h @@ -64,7 +64,8 @@ protected: void StoreFocus( PlayerNumber pn ); void BeginFadingOut(); - RString GetNextScreenForSelection( PlayerNumber pn ) const; + virtual bool FocusedItemEndsScreen( PlayerNumber pn ) const; + RString GetNextScreenForFocusedItem( PlayerNumber pn ) const; void ChangeValueInRowRelative( int iRow, PlayerNumber pn, int iDelta, bool bRepeat ); void ChangeValueInRowAbsolute( int iRow, PlayerNumber pn, int iChoiceIndex, bool bRepeat ); @@ -77,8 +78,8 @@ protected: virtual void MenuBack( const InputEventPlus &input ); virtual void MenuStart( const InputEventPlus &input ); virtual void ProcessMenuStart( const InputEventPlus &input ); - virtual void MenuLeft( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.pn],input.pn,-1, input.type != IET_FIRST_PRESS); } - virtual void MenuRight( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.pn], input.pn,+1, input.type != IET_FIRST_PRESS); } + virtual void MenuLeft( const InputEventPlus &input ); + virtual void MenuRight( const InputEventPlus &input ); virtual void MenuUp( const InputEventPlus &input ); virtual void MenuDown( const InputEventPlus &input ); virtual void MenuSelect( const InputEventPlus &input ); diff --git a/stepmania/src/ScreenOptionsManageWorkouts.cpp b/stepmania/src/ScreenOptionsManageWorkouts.cpp index d8412ddfef..d0a0887500 100644 --- a/stepmania/src/ScreenOptionsManageWorkouts.cpp +++ b/stepmania/src/ScreenOptionsManageWorkouts.cpp @@ -10,6 +10,7 @@ #include "ScreenTextEntry.h" #include "ScreenPrompt.h" #include "StatsManager.h" +#include "PrefsManager.h" AutoScreenMessage( SM_BackFromRename ) AutoScreenMessage( SM_BackFromDelete ) @@ -40,6 +41,9 @@ REGISTER_SCREEN_CLASS( ScreenOptionsManageWorkouts ); void ScreenOptionsManageWorkouts::Init() { + if( PREFSMAN->m_bArcadeOptionsNavigation ) + SetNavigation( NAV_THREE_KEY_MENU ); + ScreenOptions::Init(); CREATE_NEW_SCREEN.Load( m_sName, "CreateNewScreen" ); diff --git a/stepmania/src/ScreenOptionsReviewWorkout.cpp b/stepmania/src/ScreenOptionsReviewWorkout.cpp index 202f2d3456..a8356a178f 100644 --- a/stepmania/src/ScreenOptionsReviewWorkout.cpp +++ b/stepmania/src/ScreenOptionsReviewWorkout.cpp @@ -18,6 +18,7 @@ #include "ScreenPrompt.h" #include "PlayerState.h" #include "Style.h" +#include "PrefsManager.h" enum ReviewWorkoutRow { @@ -42,6 +43,9 @@ AutoScreenMessage( SM_BackFromEnterName ) void ScreenOptionsReviewWorkout::Init() { + if( PREFSMAN->m_bArcadeOptionsNavigation ) + SetNavigation( NAV_THREE_KEY_MENU ); + ScreenOptions::Init(); m_soundSave.Load( THEME->GetPathS(m_sName,"Save") );