use input.pn
This commit is contained in:
@@ -346,16 +346,16 @@ void ScreenNameEntry::Input( const InputEventPlus &input )
|
|||||||
return; // ignore
|
return; // ignore
|
||||||
|
|
||||||
const int iCol = GAMESTATE->m_pCurStyle->GameInputToColumn( input.GameI );
|
const int iCol = GAMESTATE->m_pCurStyle->GameInputToColumn( input.GameI );
|
||||||
if( iCol != Column_INVALID && m_bStillEnteringName[input.MenuI.player])
|
if( iCol != Column_INVALID && m_bStillEnteringName[input.pn] )
|
||||||
{
|
{
|
||||||
int iStringIndex = m_ColToStringIndex[input.MenuI.player][iCol];
|
int iStringIndex = m_ColToStringIndex[input.pn][iCol];
|
||||||
if( iStringIndex != -1 )
|
if( iStringIndex != -1 )
|
||||||
{
|
{
|
||||||
m_ReceptorArrowRow[input.MenuI.player].Step( iCol, TNS_W1 );
|
m_ReceptorArrowRow[input.pn].Step( iCol, TNS_W1 );
|
||||||
m_soundStep.Play();
|
m_soundStep.Play();
|
||||||
char c = NAME_CHARS[GetClosestCharIndex(m_fFakeBeat)];
|
char c = NAME_CHARS[GetClosestCharIndex(m_fFakeBeat)];
|
||||||
m_textSelectedChars[input.MenuI.player][iCol].SetText( ssprintf("%c",c) );
|
m_textSelectedChars[input.pn][iCol].SetText( ssprintf("%c",c) );
|
||||||
m_sSelectedName[input.MenuI.player][iStringIndex] = c;
|
m_sSelectedName[input.pn][iStringIndex] = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ void ScreenNetRoom::MenuLeft( const InputEventPlus &input )
|
|||||||
if( input.type == IET_FIRST_PRESS )
|
if( input.type == IET_FIRST_PRESS )
|
||||||
m_RoomWheel.Move(-1);
|
m_RoomWheel.Move(-1);
|
||||||
|
|
||||||
ScreenNetSelectBase::MenuLeft( input.MenuI.player );
|
ScreenNetSelectBase::MenuLeft( input.pn );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenNetRoom::MenuRight( const InputEventPlus &input )
|
void ScreenNetRoom::MenuRight( const InputEventPlus &input )
|
||||||
@@ -258,7 +258,7 @@ void ScreenNetRoom::MenuRight( const InputEventPlus &input )
|
|||||||
if( input.type == IET_FIRST_PRESS )
|
if( input.type == IET_FIRST_PRESS )
|
||||||
m_RoomWheel.Move(1);
|
m_RoomWheel.Move(1);
|
||||||
|
|
||||||
ScreenNetSelectBase::MenuRight( input.MenuI.player );
|
ScreenNetSelectBase::MenuRight( input.pn );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenNetRoom::UpdateRoomsList()
|
void ScreenNetRoom::UpdateRoomsList()
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ void ScreenNetSelectMusic::MenuDown( const InputEventPlus &input )
|
|||||||
their difficulty. */
|
their difficulty. */
|
||||||
/* Why? Nothing else allows that. */
|
/* Why? Nothing else allows that. */
|
||||||
|
|
||||||
PlayerNumber pn = input.MenuI.player;
|
PlayerNumber pn = input.pn;
|
||||||
if ( GAMESTATE->IsPlayerEnabled( PLAYER_2 ) &&
|
if ( GAMESTATE->IsPlayerEnabled( PLAYER_2 ) &&
|
||||||
!GAMESTATE->IsPlayerEnabled( PLAYER_1 ) )
|
!GAMESTATE->IsPlayerEnabled( PLAYER_1 ) )
|
||||||
pn = PLAYER_2;
|
pn = PLAYER_2;
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ void ScreenOptions::Input( const InputEventPlus &input )
|
|||||||
if( m_Cancel.IsTransitioning() || m_Out.IsTransitioning() || m_fLockInputSecs > 0 )
|
if( m_Cancel.IsTransitioning() || m_Out.IsTransitioning() || m_fLockInputSecs > 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !GAMESTATE->IsHumanPlayer(input.MenuI.player) )
|
if( !GAMESTATE->IsHumanPlayer(input.pn) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( input.type == IET_RELEASE )
|
if( input.type == IET_RELEASE )
|
||||||
@@ -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.MenuI.player, MENU_BUTTON_START) );
|
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_START) );
|
||||||
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.MenuI.player, MENU_BUTTON_RIGHT) );
|
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_RIGHT) );
|
||||||
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.MenuI.player, MENU_BUTTON_LEFT) );
|
INPUTMAPPER->ResetKeyRepeat( MenuInput(input.pn, MENU_BUTTON_LEFT) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -772,7 +772,7 @@ bool ScreenOptions::AllAreOnLastRow() const
|
|||||||
|
|
||||||
void ScreenOptions::MenuStart( const InputEventPlus &input )
|
void ScreenOptions::MenuStart( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
PlayerNumber pn = input.MenuI.player;
|
PlayerNumber pn = input.pn;
|
||||||
switch( input.type )
|
switch( input.type )
|
||||||
{
|
{
|
||||||
case IET_FIRST_PRESS:
|
case IET_FIRST_PRESS:
|
||||||
@@ -810,7 +810,7 @@ void ScreenOptions::MenuStart( const InputEventPlus &input )
|
|||||||
|
|
||||||
void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
|
void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
PlayerNumber pn = input.MenuI.player;
|
PlayerNumber pn = input.pn;
|
||||||
int iCurRow = m_iCurrentRow[pn];
|
int iCurRow = m_iCurrentRow[pn];
|
||||||
OptionRow &row = *m_pRows[iCurRow];
|
OptionRow &row = *m_pRows[iCurRow];
|
||||||
|
|
||||||
@@ -818,11 +818,11 @@ void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
/* In NAV_THREE_KEY_MENU mode, if a row doesn't set a screen, it does
|
/* 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. */
|
* something. Apply it now, and don't go to the next screen. */
|
||||||
RString sScreen = GetNextScreenForSelection( input.MenuI.player );
|
RString sScreen = GetNextScreenForSelection( input.pn );
|
||||||
if( sScreen.empty() )
|
if( sScreen.empty() )
|
||||||
{
|
{
|
||||||
vector<PlayerNumber> vpns;
|
vector<PlayerNumber> vpns;
|
||||||
vpns.push_back( input.MenuI.player );
|
vpns.push_back( input.pn );
|
||||||
ExportOptions( iCurRow, vpns );
|
ExportOptions( iCurRow, vpns );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1215,7 +1215,7 @@ void ScreenOptions::MenuSelect( const InputEventPlus &input )
|
|||||||
void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir )
|
void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir )
|
||||||
{
|
{
|
||||||
ASSERT( iDir == -1 || iDir == +1 );
|
ASSERT( iDir == -1 || iDir == +1 );
|
||||||
PlayerNumber pn = input.MenuI.player;
|
PlayerNumber pn = input.pn;
|
||||||
|
|
||||||
if( input.type == IET_REPEAT )
|
if( input.type == IET_REPEAT )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user