pass pn (duplicate will go away later)
This commit is contained in:
@@ -321,8 +321,8 @@ done:
|
|||||||
|
|
||||||
void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn )
|
void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
bool bLeftPressed = INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_LEFT) );
|
bool bLeftPressed = INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_LEFT), pn );
|
||||||
bool bRightPressed = INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_RIGHT) );
|
bool bRightPressed = INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_RIGHT), pn );
|
||||||
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
||||||
|
|
||||||
if ( bLeftAndRightPressed )
|
if ( bLeftAndRightPressed )
|
||||||
@@ -333,8 +333,8 @@ void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenNetSelectMusic::MenuRight( PlayerNumber pn )
|
void ScreenNetSelectMusic::MenuRight( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
bool bLeftPressed = INPUTMAPPER->IsBeingPressed( MenuInput (pn, MENU_BUTTON_LEFT) );
|
bool bLeftPressed = INPUTMAPPER->IsBeingPressed( MenuInput (pn, MENU_BUTTON_LEFT), pn );
|
||||||
bool bRightPressed = INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_RIGHT) ) ;
|
bool bRightPressed = INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_RIGHT), pn );
|
||||||
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
||||||
|
|
||||||
if ( bLeftAndRightPressed )
|
if ( bLeftAndRightPressed )
|
||||||
|
|||||||
@@ -503,9 +503,9 @@ void ScreenOptions::Input( const InputEventPlus &input )
|
|||||||
case MENU_BUTTON_SELECT:
|
case MENU_BUTTON_SELECT:
|
||||||
case MENU_BUTTON_RIGHT:
|
case MENU_BUTTON_RIGHT:
|
||||||
case MENU_BUTTON_LEFT:
|
case MENU_BUTTON_LEFT:
|
||||||
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_START) );
|
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_START), input.pn );
|
||||||
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_RIGHT) );
|
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_RIGHT), input.pn );
|
||||||
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_LEFT) );
|
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_LEFT), input.pn );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -794,8 +794,8 @@ void ScreenOptions::MenuStart( const InputEventPlus &input )
|
|||||||
case NAV_TOGGLE_THREE_KEY:
|
case NAV_TOGGLE_THREE_KEY:
|
||||||
{
|
{
|
||||||
bool bHoldingLeftAndRight =
|
bool bHoldingLeftAndRight =
|
||||||
INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_RIGHT) ) &&
|
INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_RIGHT), pn ) &&
|
||||||
INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_LEFT) );
|
INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_LEFT), pn );
|
||||||
if( bHoldingLeftAndRight )
|
if( bHoldingLeftAndRight )
|
||||||
{
|
{
|
||||||
if( MoveRowRelative(pn, -1, input.type != IET_FIRST_PRESS) )
|
if( MoveRowRelative(pn, -1, input.type != IET_FIRST_PRESS) )
|
||||||
@@ -1223,14 +1223,14 @@ void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir )
|
|||||||
* holding both up and down from toggling repeatedly in-place. */
|
* holding both up and down from toggling repeatedly in-place. */
|
||||||
if( iDir == +1 )
|
if( iDir == +1 )
|
||||||
{
|
{
|
||||||
if( INPUTMAPPER->IsBeingPressed(MenuInput(pn, MENU_BUTTON_UP)) ||
|
if( INPUTMAPPER->IsBeingPressed(MenuInput(pn, MENU_BUTTON_UP), pn) ||
|
||||||
INPUTMAPPER->IsBeingPressed(MenuInput(pn, MENU_BUTTON_SELECT)) )
|
INPUTMAPPER->IsBeingPressed(MenuInput(pn, MENU_BUTTON_SELECT), pn) )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( INPUTMAPPER->IsBeingPressed(MenuInput(pn, MENU_BUTTON_DOWN)) ||
|
if( INPUTMAPPER->IsBeingPressed(MenuInput(pn, MENU_BUTTON_DOWN), pn) ||
|
||||||
INPUTMAPPER->IsBeingPressed(MenuInput(pn, MENU_BUTTON_START)) )
|
INPUTMAPPER->IsBeingPressed(MenuInput(pn, MENU_BUTTON_START), pn) )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
return; // don't care
|
return; // don't care
|
||||||
|
|
||||||
|
|
||||||
PlayerNumber pn = input.MenuI.player;
|
PlayerNumber pn = input.pn;
|
||||||
if( !GAMESTATE->IsHumanPlayer(pn) )
|
if( !GAMESTATE->IsHumanPlayer(pn) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( SELECT_MENU_AVAILABLE && INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_SELECT) ) )
|
if( SELECT_MENU_AVAILABLE && INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_SELECT), pn ) )
|
||||||
{
|
{
|
||||||
if( input.type == IET_FIRST_PRESS )
|
if( input.type == IET_FIRST_PRESS )
|
||||||
{
|
{
|
||||||
@@ -370,8 +370,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
bool bRightIsDown = false;
|
bool bRightIsDown = false;
|
||||||
FOREACH_EnabledPlayer( p )
|
FOREACH_EnabledPlayer( p )
|
||||||
{
|
{
|
||||||
bLeftIsDown |= INPUTMAPPER->IsBeingPressed( MenuInput(p, MENU_BUTTON_LEFT) );
|
bLeftIsDown |= INPUTMAPPER->IsBeingPressed( MenuInput(p, MENU_BUTTON_LEFT), p );
|
||||||
bRightIsDown |= INPUTMAPPER->IsBeingPressed( MenuInput(p, MENU_BUTTON_RIGHT) );
|
bRightIsDown |= INPUTMAPPER->IsBeingPressed( MenuInput(p, MENU_BUTTON_RIGHT), p );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bBothDown = bLeftIsDown && bRightIsDown;
|
bool bBothDown = bLeftIsDown && bRightIsDown;
|
||||||
@@ -422,8 +422,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_HumanPlayer( p )
|
||||||
{
|
{
|
||||||
INPUTMAPPER->ResetKeyRepeat( MenuInput(p, MENU_BUTTON_LEFT) );
|
INPUTMAPPER->ResetKeyRepeat( MenuInput(p, MENU_BUTTON_LEFT), p );
|
||||||
INPUTMAPPER->ResetKeyRepeat( MenuInput(p, MENU_BUTTON_RIGHT) );
|
INPUTMAPPER->ResetKeyRepeat( MenuInput(p, MENU_BUTTON_RIGHT), p );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -444,7 +444,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
case MENU_BUTTON_BACK:
|
case MENU_BUTTON_BACK:
|
||||||
/* Don't make the user hold the back button if they're pressing escape and escape is the back button. */
|
/* Don't make the user hold the back button if they're pressing escape and escape is the back button. */
|
||||||
if( input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_ESC )
|
if( input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_ESC )
|
||||||
this->MenuBack( input.MenuI.player );
|
this->MenuBack( input.pn );
|
||||||
else
|
else
|
||||||
Screen::MenuBack( input );
|
Screen::MenuBack( input );
|
||||||
break;
|
break;
|
||||||
@@ -506,8 +506,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
void ScreenSelectMusic::UpdateSelectButton()
|
void ScreenSelectMusic::UpdateSelectButton()
|
||||||
{
|
{
|
||||||
bool bSelectIsDown = false;
|
bool bSelectIsDown = false;
|
||||||
FOREACH_EnabledPlayer( p )
|
FOREACH_EnabledPlayer( pn )
|
||||||
bSelectIsDown |= INPUTMAPPER->IsBeingPressed( MenuInput(p, MENU_BUTTON_SELECT) );
|
bSelectIsDown |= INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_SELECT), pn );
|
||||||
if( !SELECT_MENU_AVAILABLE )
|
if( !SELECT_MENU_AVAILABLE )
|
||||||
bSelectIsDown = false;
|
bSelectIsDown = false;
|
||||||
|
|
||||||
|
|||||||
@@ -184,8 +184,8 @@ void ScreenSetTime::MenuRight( PlayerNumber pn )
|
|||||||
void ScreenSetTime::MenuStart( PlayerNumber pn )
|
void ScreenSetTime::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
bool bHoldingLeftAndRight =
|
bool bHoldingLeftAndRight =
|
||||||
INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_RIGHT) ) &&
|
INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_RIGHT), pn ) &&
|
||||||
INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_LEFT) );
|
INPUTMAPPER->IsBeingPressed( MenuInput(pn, MENU_BUTTON_LEFT), pn );
|
||||||
|
|
||||||
if( bHoldingLeftAndRight )
|
if( bHoldingLeftAndRight )
|
||||||
ChangeSelection( -1 );
|
ChangeSelection( -1 );
|
||||||
|
|||||||
Reference in New Issue
Block a user