Clarify the select path: when select is pressed, stop the wheel immediately.

Previously, if select was pressed while holding left/right, it would stop on the
next repeat.  That's OK, since the button repeat is much faster than the wheel,
but it's confusing.
This commit is contained in:
Glenn Maynard
2005-09-18 11:41:44 +00:00
parent f60111be68
commit 31a1f078ea
+13 -12
View File
@@ -743,9 +743,15 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
LoadHelpText();
bool bSelectIsPressed =
SELECT_MENU_AVAILABLE && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_SELECT) );
if( bSelectIsPressed )
if( input.MenuI.button == MENU_BUTTON_SELECT )
{
if( input.type == IET_FIRST_PRESS )
m_MusicWheel.Move( 0 );
return;
}
if( SELECT_MENU_AVAILABLE && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_SELECT) ) )
{
if( input.type == IET_FIRST_PRESS )
{
@@ -765,6 +771,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
return;
}
}
return;
}
switch( input.MenuI.button )
@@ -780,11 +787,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
bool bRightIsDown = false;
FOREACH_EnabledPlayer( p )
{
if( !bSelectIsPressed )
{
bLeftIsDown |= INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_LEFT) );
bRightIsDown |= INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_RIGHT) );
}
bLeftIsDown |= INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_LEFT) );
bRightIsDown |= INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_RIGHT) );
}
bool bBothDown = bLeftIsDown && bRightIsDown;
@@ -793,6 +797,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
if( bNeitherDown )
{
/* Both buttons released. */
m_MusicWheel.Move( 0 );
}
else if( bBothDown )
@@ -842,10 +847,6 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
break;
}
if( bSelectIsPressed )
return;
// TRICKY: Do default processing of MenuLeft and MenuRight before detecting
// codes. Do default processing of Start AFTER detecting codes. This gives us a
// change to return if Start is part of a code because we don't want to process