experimental input mode: left/right always changes row, start toggles selected item; gives the same navigation for the main service menu and submenus

This commit is contained in:
Glenn Maynard
2008-05-27 17:37:01 +00:00
parent 0544328038
commit f832fff3d2
7 changed files with 29 additions and 10 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ PrefsManager::PrefsManager() :
m_bShowSelectGroup ( "ShowSelectGroup", false ),
m_bShowCaution ( "ShowCaution", true ),
m_bShowNativeLanguage ( "ShowNativeLanguage", true ),
m_bArcadeOptionsNavigation ( "ArcadeOptionsNavigation", false ),
m_iArcadeOptionsNavigation ( "ArcadeOptionsNavigation", 0 ),
m_MusicWheelUsesSections ( "MusicWheelUsesSections", MusicWheelUsesSections_ALWAYS ),
m_iMusicWheelSwitchSpeed ( "MusicWheelSwitchSpeed", 10 ),
m_AllowW1 ( "AllowW1", ALLOW_W1_EVERYWHERE ),
+1 -1
View File
@@ -143,7 +143,7 @@ public:
Preference<bool> m_bShowSelectGroup;
Preference<bool> m_bShowCaution;
Preference<bool> m_bShowNativeLanguage;
Preference<bool> m_bArcadeOptionsNavigation;
Preference<int> m_iArcadeOptionsNavigation;
Preference<MusicWheelUsesSections> m_MusicWheelUsesSections;
Preference<int> m_iMusicWheelSwitchSpeed;
Preference<AllowW1> m_AllowW1;
+1 -1
View File
@@ -48,7 +48,7 @@ REGISTER_SCREEN_CLASS( ScreenMiniMenu );
void ScreenMiniMenu::Init()
{
if( PREFSMAN->m_bArcadeOptionsNavigation )
if( PREFSMAN->m_iArcadeOptionsNavigation )
SetNavigation( NAV_THREE_KEY_MENU );
ScreenOptions::Init();
+23 -4
View File
@@ -30,6 +30,10 @@
* (next screen via "exit" entry)
* This is the minimal navigation, for using menus with only three buttons.
*
* NAV_THREE_KEY_ALT:
* left, right -> next, prev row
* start -> change option
*
* NAV_FIVE_KEY:
* start -> next screen
* This is a much more convenient navigation, requiring five keys.
@@ -46,7 +50,7 @@
* for non-multiselect rows (eg. scroll speed).
*
* THREE_KEY modes are navigatable with only MenuLeft, MenuRight and MenuStart, and
* are used when PREFSMAN->m_bArcadeOptionsNavigation is enabled. However, they can
* are used when PREFSMAN->m_iArcadeOptionsNavigation is enabled. However, they can
* still use MenuUp and MenuDown for nonessential behavior.
*
* NAV_THREE_KEY_MENU:
@@ -77,7 +81,12 @@ StringToX( InputMode );
ScreenOptions::ScreenOptions()
{
// These can be overridden in a derived Init().
m_OptionsNavigation = PREFSMAN->m_bArcadeOptionsNavigation? NAV_THREE_KEY:NAV_FIVE_KEY;
switch( PREFSMAN->m_iArcadeOptionsNavigation )
{
case 0: SetNavigation( NAV_FIVE_KEY ); break;
case 1: SetNavigation( NAV_THREE_KEY ); break;
case 2: SetNavigation( NAV_THREE_KEY_ALT ); break;
}
m_InputMode = INPUTMODE_SHARE_CURSOR;
}
@@ -910,6 +919,10 @@ void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
return;
MenuDown( input );
break;
case NAV_THREE_KEY_ALT:
ChangeValueInRowRelative( m_iCurrentRow[input.pn], input.pn, +1, input.type != IET_FIRST_PRESS );
break;
case NAV_TOGGLE_THREE_KEY:
case NAV_TOGGLE_FIVE_KEY:
{
@@ -1215,12 +1228,18 @@ bool ScreenOptions::MoveRowAbsolute( PlayerNumber pn, int iRow )
void ScreenOptions::MenuLeft( const InputEventPlus &input )
{
ChangeValueInRowRelative(m_iCurrentRow[input.pn],input.pn,-1, input.type != IET_FIRST_PRESS);
if( m_OptionsNavigation == NAV_THREE_KEY_ALT )
MenuUpDown( input, -1 );
else
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);
if( m_OptionsNavigation == NAV_THREE_KEY_ALT )
MenuUpDown( input, +1 );
else
ChangeValueInRowRelative(m_iCurrentRow[input.pn], input.pn,+1, input.type != IET_FIRST_PRESS);
}
void ScreenOptions::MenuUp( const InputEventPlus &input )
+1 -1
View File
@@ -89,7 +89,7 @@ protected:
bool AllAreOnLastRow() const;
protected: // derived classes need access to these
enum Navigation { NAV_THREE_KEY, NAV_THREE_KEY_MENU, NAV_FIVE_KEY, NAV_TOGGLE_THREE_KEY, NAV_TOGGLE_FIVE_KEY };
enum Navigation { NAV_THREE_KEY, NAV_THREE_KEY_MENU, NAV_THREE_KEY_ALT, NAV_FIVE_KEY, NAV_TOGGLE_THREE_KEY, NAV_TOGGLE_FIVE_KEY };
void SetNavigation( Navigation nav ) { m_OptionsNavigation = nav; }
void SetInputMode( InputMode im ) { m_InputMode = im; }
@@ -41,7 +41,7 @@ REGISTER_SCREEN_CLASS( ScreenOptionsManageWorkouts );
void ScreenOptionsManageWorkouts::Init()
{
if( PREFSMAN->m_bArcadeOptionsNavigation )
if( PREFSMAN->m_iArcadeOptionsNavigation )
SetNavigation( NAV_THREE_KEY_MENU );
ScreenOptions::Init();
+1 -1
View File
@@ -43,7 +43,7 @@ AutoScreenMessage( SM_BackFromEnterName )
void ScreenOptionsReviewWorkout::Init()
{
if( PREFSMAN->m_bArcadeOptionsNavigation )
if( PREFSMAN->m_iArcadeOptionsNavigation )
SetNavigation( NAV_THREE_KEY_MENU );
ScreenOptions::Init();