Change MenuUp(pn,type) overrides to MenuUp(IEP), so info like DeviceI.ts is always accessible.

This commit is contained in:
Glenn Maynard
2005-09-23 00:44:52 +00:00
parent df8153cf7b
commit 6ea2f37a36
40 changed files with 218 additions and 185 deletions
+20 -11
View File
@@ -135,12 +135,21 @@ void Screen::Update( float fDeltaTime )
}
}
void Screen::MenuBack( PlayerNumber pn, const InputEventType type )
void Screen::MenuUp( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuUp(input.MenuI.player); }
void Screen::MenuDown( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuDown(input.MenuI.player); }
void Screen::MenuLeft( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuLeft(input.MenuI.player); }
void Screen::MenuRight( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuRight(input.MenuI.player); }
void Screen::MenuStart( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuStart(input.MenuI.player); }
void Screen::MenuSelect( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuSelect(input.MenuI.player); }
void Screen::MenuBack( const InputEventPlus &input )
{
if(!PREFSMAN->m_bDelayedBack || type==IET_SLOW_REPEAT || type==IET_FAST_REPEAT)
MenuBack(pn);
if(!PREFSMAN->m_bDelayedBack || input.type==IET_SLOW_REPEAT || input.type==IET_FAST_REPEAT)
MenuBack( input.MenuI.player) ;
}
void Screen::MenuCoin( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuCoin(input.MenuI.player); }
/* ScreenManager sends input here first. Overlay screens can use it to get a first
* pass at input. Return true if the input was handled and should not be passed
* to lower screens, or false if not handled. If true is returned, Input() will
@@ -176,14 +185,14 @@ void Screen::Input( const InputEventPlus &input )
switch( input.MenuI.button )
{
case MENU_BUTTON_UP: this->MenuUp ( input.MenuI.player, input.type ); return;
case MENU_BUTTON_DOWN: this->MenuDown ( input.MenuI.player, input.type ); return;
case MENU_BUTTON_LEFT: this->MenuLeft ( input.MenuI.player, input.type ); return;
case MENU_BUTTON_RIGHT: this->MenuRight ( input.MenuI.player, input.type ); return;
case MENU_BUTTON_BACK: this->MenuBack ( input.MenuI.player, input.type ); return;
case MENU_BUTTON_START: this->MenuStart ( input.MenuI.player, input.type ); return;
case MENU_BUTTON_SELECT:this->MenuSelect( input.MenuI.player, input.type ); return;
case MENU_BUTTON_COIN: this->MenuCoin ( input.MenuI.player, input.type ); return;
case MENU_BUTTON_UP: this->MenuUp ( input ); return;
case MENU_BUTTON_DOWN: this->MenuDown ( input ); return;
case MENU_BUTTON_LEFT: this->MenuLeft ( input ); return;
case MENU_BUTTON_RIGHT: this->MenuRight ( input ); return;
case MENU_BUTTON_BACK: this->MenuBack ( input ); return;
case MENU_BUTTON_START: this->MenuStart ( input ); return;
case MENU_BUTTON_SELECT:this->MenuSelect( input ); return;
case MENU_BUTTON_COIN: this->MenuCoin ( input ); return;
}
}
+8 -8
View File
@@ -84,14 +84,14 @@ protected:
public:
// let subclass override if they want
virtual void MenuUp( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuUp(pn); }
virtual void MenuDown( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuDown(pn); }
virtual void MenuLeft( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuLeft(pn); }
virtual void MenuRight( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuRight(pn); }
virtual void MenuStart( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuStart(pn); }
virtual void MenuSelect( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuSelect(pn); }
virtual void MenuBack( PlayerNumber pn, const InputEventType type );
virtual void MenuCoin( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuCoin(pn); }
virtual void MenuUp( const InputEventPlus &input );
virtual void MenuDown( const InputEventPlus &input );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuSelect( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
virtual void MenuCoin( const InputEventPlus &input );
virtual void MenuUp( PlayerNumber pn ) {}
virtual void MenuDown( PlayerNumber pn ) {}
+2 -2
View File
@@ -118,7 +118,7 @@ void ScreenEditMenu::MenuDown( PlayerNumber pn )
}
}
void ScreenEditMenu::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenEditMenu::MenuLeft( const InputEventPlus &input )
{
if( m_Selector.CanGoLeft() )
{
@@ -126,7 +126,7 @@ void ScreenEditMenu::MenuLeft( PlayerNumber pn, const InputEventType type )
}
}
void ScreenEditMenu::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenEditMenu::MenuRight( const InputEventPlus &input )
{
if( m_Selector.CanGoRight() )
{
+2 -2
View File
@@ -17,8 +17,8 @@ private:
void MenuUp( PlayerNumber pn );
void MenuDown( PlayerNumber pn );
void MenuLeft( PlayerNumber pn, const InputEventType type );
void MenuRight( PlayerNumber pn, const InputEventType type );
void MenuLeft( const InputEventPlus &input );
void MenuRight( const InputEventPlus &input );
void MenuBack( PlayerNumber pn );
void MenuStart( PlayerNumber pn );
+2 -2
View File
@@ -393,7 +393,7 @@ void ScreenEz2SelectMusic::HandleScreenMessage( const ScreenMessage SM )
}
void ScreenEz2SelectMusic::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenEz2SelectMusic::MenuRight( const InputEventPlus &input )
{
m_MenuTimer->Stall();
m_MusicBannerWheel.BannersRight();
@@ -438,7 +438,7 @@ void ScreenEz2SelectMusic::TweenOffScreen()
}
void ScreenEz2SelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenEz2SelectMusic::MenuLeft( const InputEventPlus &input )
{
m_MenuTimer->Stall();
m_MusicBannerWheel.BannersLeft();
+2 -2
View File
@@ -21,8 +21,8 @@ public:
virtual void Input( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuLeft( PlayerNumber pn, const InputEventType type );
virtual void MenuRight( PlayerNumber pn, const InputEventType type );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn );
protected:
+1 -1
View File
@@ -133,7 +133,7 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName )
{
GAMESTATE->GetRankingFeats( p, aFeats[p] );
GAMESTATE->JoinPlayer( p );
m_bStillEnteringName[p] = true;//aFeats[p].size()>0;
m_bStillEnteringName[p] = aFeats[p].size()>0;
}
if( !AnyStillEntering() )
+19 -8
View File
@@ -23,6 +23,7 @@
#include "Style.h"
#include "ScreenDimensions.h"
#include "Command.h"
#include "InputEventPlus.h"
//
// Defines specific to ScreenNameEntryTraditional
@@ -561,7 +562,7 @@ void ScreenNameEntryTraditional::HandleScreenMessage( const ScreenMessage SM )
{
FOREACH_PlayerNumber( p )
Finish( p );
MenuStart( PLAYER_INVALID, IET_FIRST_PRESS );
HandleStart( PLAYER_INVALID );
}
}
else if( SM == SM_ChangeDisplayedFeat )
@@ -610,7 +611,15 @@ void ScreenNameEntryTraditional::UpdateSelectionText( int pn )
m_textSelection[pn].SetText( WStringToCString(text) );
}
void ScreenNameEntryTraditional::MenuStart( PlayerNumber pn, const InputEventType type )
void ScreenNameEntryTraditional::MenuStart( const InputEventPlus &input )
{
if( input.type != IET_FIRST_PRESS )
return; // ignore
HandleStart( input.MenuI.player );
}
void ScreenNameEntryTraditional::HandleStart( PlayerNumber pn )
{
/* The screen may have started out with nobody entering, in which case we're
* just showing scores and the first Start press moves on. */
@@ -622,8 +631,6 @@ void ScreenNameEntryTraditional::MenuStart( PlayerNumber pn, const InputEventTyp
if( !m_bStillEnteringName[pn] )
return; // ignore
if( type != IET_FIRST_PRESS )
return; // ignore
const int CurrentSelection = m_SelectedChar[pn];
const int SelectedLetter = m_AlphabetLetter[pn][CurrentSelection];
@@ -656,11 +663,13 @@ void ScreenNameEntryTraditional::MenuStart( PlayerNumber pn, const InputEventTyp
}
}
void ScreenNameEntryTraditional::MenuSelect( PlayerNumber pn, const InputEventType type )
void ScreenNameEntryTraditional::MenuSelect( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
if( !m_bStillEnteringName[pn] )
return; // ignore
if( type != IET_FIRST_PRESS )
if( input.type != IET_FIRST_PRESS )
return; // ignore
Backspace( pn );
@@ -693,8 +702,9 @@ void ScreenNameEntryTraditional::Backspace( PlayerNumber pn )
m_soundKey.Play();
}
void ScreenNameEntryTraditional::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenNameEntryTraditional::MenuLeft( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
if( !m_bStillEnteringName[pn] || IsTransitioning() )
return;
@@ -704,8 +714,9 @@ void ScreenNameEntryTraditional::MenuLeft( PlayerNumber pn, const InputEventType
m_soundChange.Play();
}
void ScreenNameEntryTraditional::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenNameEntryTraditional::MenuRight( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
if( !m_bStillEnteringName[pn] || IsTransitioning() )
return;
+5 -4
View File
@@ -49,10 +49,10 @@ public:
void HandleScreenMessage( const ScreenMessage SM );
void Input( const InputEventPlus &input );
void MenuStart( PlayerNumber pn, const InputEventType type );
void MenuSelect( PlayerNumber pn, const InputEventType type );
void MenuLeft( PlayerNumber pn, const InputEventType type );
void MenuRight( PlayerNumber pn, const InputEventType type );
void MenuStart( const InputEventPlus &input );
void MenuSelect( const InputEventPlus &input );
void MenuLeft( const InputEventPlus &input );
void MenuRight( const InputEventPlus &input );
private:
bool AnyStillEntering() const;
@@ -63,6 +63,7 @@ private:
void ChangeDisplayedFeat();
void SelectChar( PlayerNumber pn, int c );
void Backspace( PlayerNumber pn );
void HandleStart( PlayerNumber pn );
ThemeMetric<float> ALPHABET_GAP_X;
ThemeMetric<int> NUM_ALPHABET_DISPLAYED;
+6 -6
View File
@@ -88,12 +88,12 @@ void ScreenNetEvaluation::RedoUserTexts()
}
}
void ScreenNetEvaluation::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenNetEvaluation::MenuLeft( const InputEventPlus &input )
{
MenuUp( pn, type );
MenuUp( input );
}
void ScreenNetEvaluation::MenuUp( PlayerNumber pn, const InputEventType type )
void ScreenNetEvaluation::MenuUp( const InputEventPlus &input )
{
if ( m_iActivePlayers == 0 )
return;
@@ -105,12 +105,12 @@ void ScreenNetEvaluation::MenuUp( PlayerNumber pn, const InputEventType type )
UpdateStats();
}
void ScreenNetEvaluation::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenNetEvaluation::MenuRight( const InputEventPlus &input )
{
MenuDown( pn, type );
MenuDown( input );
}
void ScreenNetEvaluation::MenuDown( PlayerNumber pn, const InputEventType type )
void ScreenNetEvaluation::MenuDown( const InputEventPlus &input )
{
if ( m_iActivePlayers == 0 )
return;
+4 -4
View File
@@ -11,10 +11,10 @@ public:
virtual void Init();
protected:
virtual void MenuLeft( PlayerNumber pn, const InputEventType type );
virtual void MenuUp( PlayerNumber pn, const InputEventType type );
virtual void MenuRight( PlayerNumber pn, const InputEventType type );
virtual void MenuDown( PlayerNumber pn, const InputEventType type );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuUp( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuDown( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void TweenOffScreen( );
+10 -10
View File
@@ -212,32 +212,32 @@ void ScreenNetRoom::MenuBack( PlayerNumber pn )
ScreenNetSelectBase::MenuBack( pn );
}
void ScreenNetRoom::MenuUp( PlayerNumber pn, const InputEventType type )
void ScreenNetRoom::MenuUp( const InputEventPlus &input )
{
ScreenNetSelectBase::MenuUp( pn );
ScreenNetSelectBase::MenuUp( input.MenuI.player );
}
void ScreenNetRoom::MenuDown( PlayerNumber pn, const InputEventType type )
void ScreenNetRoom::MenuDown( const InputEventPlus &input )
{
ScreenNetSelectBase::MenuDown( pn );
ScreenNetSelectBase::MenuDown( input.MenuI.player );
}
void ScreenNetRoom::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenNetRoom::MenuLeft( const InputEventPlus &input )
{
if (type == IET_FIRST_PRESS)
if( input.type == IET_FIRST_PRESS )
m_RoomWheel.Move(-1);
ScreenNetSelectBase::MenuLeft( pn );
ScreenNetSelectBase::MenuLeft( input.MenuI.player );
}
void ScreenNetRoom::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenNetRoom::MenuRight( const InputEventPlus &input )
{
if (type == IET_FIRST_PRESS)
if( input.type == IET_FIRST_PRESS )
{
m_RoomWheel.Move(1);
}
ScreenNetSelectBase::MenuRight( pn );
ScreenNetSelectBase::MenuRight( input.MenuI.player );
}
void ScreenNetRoom::UpdateRoomsList()
+4 -4
View File
@@ -39,8 +39,8 @@ public:
protected:
virtual void MenuStart( PlayerNumber pn );
virtual void MenuUp( PlayerNumber pn, const InputEventType type );
virtual void MenuDown( PlayerNumber pn, const InputEventType type );
virtual void MenuUp( const InputEventPlus &input );
virtual void MenuDown( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn );
virtual void TweenOffScreen( );
@@ -48,8 +48,8 @@ protected:
private:
void UpdateRoomsList();
void MenuLeft( PlayerNumber pn, const InputEventType type );
void MenuRight( PlayerNumber pn, const InputEventType type );
void MenuLeft( const InputEventPlus &input );
void MenuRight( const InputEventPlus &input );
void CreateNewRoom( const CString& rName, const CString& rDesc );
void DeployInfoBox();
+16 -10
View File
@@ -310,45 +310,51 @@ done:
ScreenNetSelectBase::HandleScreenMessage( SM );
}
void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenNetSelectMusic::MenuLeft( const InputEventPlus &input )
{
bool bLeftPressed = INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_LEFT) );
bool bRightPressed = INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_RIGHT) );
bool bLeftPressed = INPUTMAPPER->IsButtonDown( MenuInput(input.MenuI.player, MENU_BUTTON_LEFT) );
bool bRightPressed = INPUTMAPPER->IsButtonDown( MenuInput(input.MenuI.player, MENU_BUTTON_RIGHT) );
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
if ( type == IET_FIRST_PRESS )
if( input.type == IET_FIRST_PRESS )
{
if ( bLeftAndRightPressed )
m_MusicWheel.ChangeSort( SORT_MODE_MENU );
else
m_MusicWheel.Move( -1 );
}
}
void ScreenNetSelectMusic::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenNetSelectMusic::MenuRight( const InputEventPlus &input )
{
bool bLeftPressed = INPUTMAPPER->IsButtonDown( MenuInput ( pn, MENU_BUTTON_LEFT ) );
bool bRightPressed = INPUTMAPPER->IsButtonDown( MenuInput( pn, MENU_BUTTON_RIGHT )) ;
bool bLeftPressed = INPUTMAPPER->IsButtonDown( MenuInput (input.MenuI.player, MENU_BUTTON_LEFT) );
bool bRightPressed = INPUTMAPPER->IsButtonDown( MenuInput(input.MenuI.player, MENU_BUTTON_RIGHT) ) ;
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
if ( type == IET_FIRST_PRESS )
if( input.type == IET_FIRST_PRESS )
{
if ( bLeftAndRightPressed )
m_MusicWheel.ChangeSort( SORT_MODE_MENU );
else
m_MusicWheel.Move( +1 );
}
}
void ScreenNetSelectMusic::MenuUp( PlayerNumber pn, const InputEventType type )
void ScreenNetSelectMusic::MenuUp( const InputEventPlus &input )
{
NSMAN->ReportNSSOnOff(3);
GAMESTATE->m_EditMode = EDIT_MODE_FULL;
SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromPlayerOptions );
}
void ScreenNetSelectMusic::MenuDown( PlayerNumber pn, const InputEventType type )
void ScreenNetSelectMusic::MenuDown( const InputEventPlus &input )
{
/*Tricky: If we have a player on player 2, and there is only
player 2, allow them to use player 1's controls to change
their difficulty. */
/* Why? Nothing else allows that. */
PlayerNumber pn = input.MenuI.player;
if ( GAMESTATE->IsPlayerEnabled( PLAYER_2 ) &&
!GAMESTATE->IsPlayerEnabled( PLAYER_1 ) )
pn = PLAYER_2;
+4 -4
View File
@@ -53,10 +53,10 @@ private:
protected:
virtual void MenuStart( PlayerNumber pn );
virtual void MenuLeft( PlayerNumber pn, const InputEventType type );
virtual void MenuUp( PlayerNumber pn, const InputEventType type );
virtual void MenuDown( PlayerNumber pn, const InputEventType type );
virtual void MenuRight( PlayerNumber pn, const InputEventType type );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuUp( const InputEventPlus &input );
virtual void MenuDown( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn );
virtual void Update( float fDeltaTime );
+2 -2
View File
@@ -117,7 +117,7 @@ void ScreenNetworkOptions::HandleScreenMessage( const ScreenMessage SM )
}
void ScreenNetworkOptions::MenuStart( PlayerNumber pn, const InputEventType type )
void ScreenNetworkOptions::MenuStart( const InputEventPlus &input )
{
#if defined( WITHOUT_NETWORKING )
#else
@@ -159,7 +159,7 @@ void ScreenNetworkOptions::MenuStart( PlayerNumber pn, const InputEventType type
PREFSMAN->m_bEnableScoreboard.Set(false);
break;
default:
ScreenOptions::MenuStart( pn, type );
ScreenOptions::MenuStart( input );
}
#endif
}
+1 -1
View File
@@ -11,7 +11,7 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn, const InputEventType type );
virtual void MenuStart( const InputEventPlus &input );
private:
void ImportOptions( int iRow, const vector<PlayerNumber> &vpns );
+25 -22
View File
@@ -863,9 +863,10 @@ bool ScreenOptions::AllAreOnLastRow() const
return true;
}
void ScreenOptions::MenuStart( PlayerNumber pn, const InputEventType type )
void ScreenOptions::MenuStart( const InputEventPlus &input )
{
switch( type )
PlayerNumber pn = input.MenuI.player;
switch( input.type )
{
case IET_FIRST_PRESS:
m_bGotAtLeastOneStartPressed[pn] = true;
@@ -890,17 +891,18 @@ void ScreenOptions::MenuStart( PlayerNumber pn, const InputEventType type )
INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_LEFT) );
if( bHoldingLeftAndRight )
{
MoveRowRelative( pn, -1, type != IET_FIRST_PRESS );
MoveRowRelative( pn, -1, input.type != IET_FIRST_PRESS );
return;
}
}
}
this->ProcessMenuStart( pn, type );
this->ProcessMenuStart( input );
}
void ScreenOptions::ProcessMenuStart( PlayerNumber pn, const InputEventType type )
void ScreenOptions::ProcessMenuStart( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
int iCurRow = m_iCurrentRow[pn];
OptionRow &row = *m_pRows[iCurRow];
@@ -919,7 +921,7 @@ void ScreenOptions::ProcessMenuStart( PlayerNumber pn, const InputEventType type
bEndThisScreen = true;
/* Don't accept START to go to the next screen if we're still transitioning in. */
if( type != IET_FIRST_PRESS || IsTransitioning() )
if( input.type != IET_FIRST_PRESS || IsTransitioning() )
bEndThisScreen = false;
if( bEndThisScreen )
@@ -934,7 +936,7 @@ void ScreenOptions::ProcessMenuStart( PlayerNumber pn, const InputEventType type
int iChoiceInRow = row.GetChoiceInRowWithFocus(pn);
if( iChoiceInRow == 0 )
{
MenuDown( pn, type );
MenuDown( input );
return;
}
}
@@ -956,7 +958,7 @@ void ScreenOptions::ProcessMenuStart( PlayerNumber pn, const InputEventType type
if( row.GetFirstItemGoesDown() )
{
// move to the first choice in the row
ChangeValueInRowRelative( m_iCurrentRow[pn], pn, -row.GetChoiceInRowWithFocus(pn), type != IET_FIRST_PRESS );
ChangeValueInRowRelative( m_iCurrentRow[pn], pn, -row.GetChoiceInRowWithFocus(pn), input.type != IET_FIRST_PRESS );
}
}
else // data.selectType != SELECT_MULTIPLE
@@ -967,7 +969,7 @@ void ScreenOptions::ProcessMenuStart( PlayerNumber pn, const InputEventType type
// don't wrap
if( iCurRow == (int)m_pRows.size()-1 )
return;
MenuDown( pn, type );
MenuDown( input );
break;
case NAV_TOGGLE_THREE_KEY:
case NAV_TOGGLE_FIVE_KEY:
@@ -980,19 +982,19 @@ void ScreenOptions::ProcessMenuStart( PlayerNumber pn, const InputEventType type
row.SetOneSelection( pn, iChoiceInRow );
}
if( row.GetFirstItemGoesDown() )
ChangeValueInRowRelative( m_iCurrentRow[pn], pn, -row.GetChoiceInRowWithFocus(pn), type != IET_FIRST_PRESS ); // move to the first choice
ChangeValueInRowRelative( m_iCurrentRow[pn], pn, -row.GetChoiceInRowWithFocus(pn), input.type != IET_FIRST_PRESS ); // move to the first choice
else
ChangeValueInRowRelative( m_iCurrentRow[pn], pn, 0, type != IET_FIRST_PRESS );
ChangeValueInRowRelative( m_iCurrentRow[pn], pn, 0, input.type != IET_FIRST_PRESS );
break;
case NAV_THREE_KEY_MENU:
/* Don't accept START to go to the next screen if we're still transitioning in. */
if( type == IET_FIRST_PRESS && !IsTransitioning() )
if( input.type == IET_FIRST_PRESS && !IsTransitioning() )
this->BeginFadingOut();
break;
case NAV_FIVE_KEY:
/* Jump to the exit row. (If everyone's already on the exit row, then
* we'll have already gone to the next screen above.) */
MoveRowRelative( pn, m_pRows.size()-m_iCurrentRow[pn]-1, type != IET_FIRST_PRESS );
MoveRowRelative( pn, m_pRows.size()-m_iCurrentRow[pn]-1, input.type != IET_FIRST_PRESS );
break;
}
}
@@ -1230,26 +1232,27 @@ void ScreenOptions::MoveRowAbsolute( PlayerNumber pn, int iRow, bool bRepeat )
MoveRowRelative( pn, iDir, bRepeat );
}
void ScreenOptions::MenuUp( PlayerNumber pn, const InputEventType type )
void ScreenOptions::MenuUp( const InputEventPlus &input )
{
MenuUpDown( pn, type, -1 );
MenuUpDown( input, -1 );
}
void ScreenOptions::MenuDown( PlayerNumber pn, const InputEventType type )
void ScreenOptions::MenuDown( const InputEventPlus &input )
{
MenuUpDown( pn, type, +1 );
MenuUpDown( input, +1 );
}
void ScreenOptions::MenuSelect( PlayerNumber pn, const InputEventType type )
void ScreenOptions::MenuSelect( const InputEventPlus &input )
{
MenuUpDown( pn, type, -1 );
MenuUpDown( input, -1 );
}
void ScreenOptions::MenuUpDown( PlayerNumber pn, const InputEventType type, int iDir )
void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir )
{
ASSERT( iDir == -1 || iDir == +1 );
PlayerNumber pn = input.MenuI.player;
if( type == IET_SLOW_REPEAT || type == IET_FAST_REPEAT )
if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
{
/* If down is pressed, don't allow up to repeat, and vice versa. This prevents
* holding both up and down from toggling repeatedly in-place. */
@@ -1267,7 +1270,7 @@ void ScreenOptions::MenuUpDown( PlayerNumber pn, const InputEventType type, int
}
}
bool bRepeat = type != IET_FIRST_PRESS;
bool bRepeat = input.type != IET_FIRST_PRESS;
int iDest = -1;
for( int r=1; r<(int)m_pRows.size(); r++ )
+9 -8
View File
@@ -10,6 +10,7 @@
#include "OptionRow.h"
#include "OptionsCursor.h"
#include "LuaExpressionTransform.h"
#include "InputEventPlus.h"
class OptionRowHandler;
@@ -62,8 +63,8 @@ protected:
void UpdateEnabledDisabled( int iRow );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( PlayerNumber pn, const InputEventType type );
virtual void ProcessMenuStart( PlayerNumber pn, const InputEventType type );
virtual void MenuStart( const InputEventPlus &input );
virtual void ProcessMenuStart( const InputEventPlus &input );
virtual void BeginFadingOut() { this->PostScreenMessage( SM_BeginFadingOut, 0 ); }
@@ -75,12 +76,12 @@ protected:
virtual void AfterChangeRow( PlayerNumber pn ); // override this to detect when the row has changed
virtual void AfterChangeValueOrRow( PlayerNumber pn );
virtual void MenuLeft( PlayerNumber pn, const InputEventType type ) { ChangeValueInRowRelative(m_iCurrentRow[pn],pn,-1,type != IET_FIRST_PRESS); }
virtual void MenuRight( PlayerNumber pn, const InputEventType type ) { ChangeValueInRowRelative(m_iCurrentRow[pn],pn,+1,type != IET_FIRST_PRESS); }
virtual void MenuUp( PlayerNumber pn, const InputEventType type );
virtual void MenuDown( PlayerNumber pn, const InputEventType type );
virtual void MenuSelect( PlayerNumber pn, const InputEventType type );
virtual void MenuUpDown( PlayerNumber pn, const InputEventType type, int iDir ); // iDir == -1 or iDir == +1
virtual void MenuLeft( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.MenuI.player],input.MenuI.player,-1, input.type != IET_FIRST_PRESS); }
virtual void MenuRight( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.MenuI.player], input.MenuI.player,+1, input.type != IET_FIRST_PRESS); }
virtual void MenuUp( const InputEventPlus &input );
virtual void MenuDown( const InputEventPlus &input );
virtual void MenuSelect( const InputEventPlus &input );
virtual void MenuUpDown( const InputEventPlus &input, int iDir ); // iDir == -1 or iDir == +1
/* Returns -1 if on a row with no OptionRowDefinition (eg. EXIT). */
int GetCurrentRow(PlayerNumber pn = PLAYER_1) const;
+1 -1
View File
@@ -238,7 +238,7 @@ void ScreenOptionsEditCourse::ExportOptions( int iRow, const vector<PlayerNumber
}
}
void ScreenOptionsEditCourse::ProcessMenuStart( PlayerNumber pn, const InputEventType type )
void ScreenOptionsEditCourse::ProcessMenuStart( const InputEventPlus &input )
{
int iCurRow = m_iCurrentRow[PLAYER_1];
Course *pCourse = GAMESTATE->m_pCurCourse;
+1 -1
View File
@@ -20,7 +20,7 @@ protected:
virtual void AfterChangeRow( PlayerNumber pn );
virtual void AfterChangeValueInRow( int iRow, PlayerNumber pn );
virtual void ProcessMenuStart( PlayerNumber pn, const InputEventType type );
virtual void ProcessMenuStart( const InputEventPlus &input );
int GetCourseEntryIndexWithFocus() const;
@@ -388,7 +388,7 @@ void ScreenOptionsEditCourseEntry::ExportOptions( int iRow, const vector<PlayerN
}
}
void ScreenOptionsEditCourseEntry::ProcessMenuStart( PlayerNumber pn, const InputEventType type )
void ScreenOptionsEditCourseEntry::ProcessMenuStart( const InputEventPlus &input )
{
switch( m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber] )
{
+1 -1
View File
@@ -21,7 +21,7 @@ protected:
virtual void ExportOptions( int iRow, const vector<PlayerNumber> &vpns );
virtual void AfterChangeValueInRow( int iRow, PlayerNumber pn );
virtual void ProcessMenuStart( PlayerNumber pn, const InputEventType type );
virtual void ProcessMenuStart( const InputEventPlus &input );
vector<Song*> m_vpDisplayedSongs; // corresponds with the choices in the Song row
+2 -2
View File
@@ -129,7 +129,7 @@ void ScreenOptionsEditProfile::AfterChangeValueInRow( int iRow, PlayerNumber pn
GAMESTATE->m_sEditLocalProfileID.Set( GAMESTATE->m_sEditLocalProfileID );
}
void ScreenOptionsEditProfile::ProcessMenuStart( PlayerNumber pn, const InputEventType type )
void ScreenOptionsEditProfile::ProcessMenuStart( const InputEventPlus &input )
{
int iRow = GetCurrentRow();;
//OptionRow &row = *m_pRows[iRow];
@@ -141,7 +141,7 @@ void ScreenOptionsEditProfile::ProcessMenuStart( PlayerNumber pn, const InputEve
}
break;
default:
ScreenOptions::ProcessMenuStart( pn, type );
ScreenOptions::ProcessMenuStart( input );
break;
}
}
+1 -1
View File
@@ -23,7 +23,7 @@ private:
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void AfterChangeValueInRow( int iRow, PlayerNumber pn );
virtual void ProcessMenuStart( PlayerNumber pn, const InputEventType type );
virtual void ProcessMenuStart( const InputEventPlus &input );
Profile m_Original; // restore this on revert
};
+4 -4
View File
@@ -67,9 +67,9 @@ ScreenOptionsEditCourseSubMenu::ScreenOptionsEditCourseSubMenu( CString sName )
}
void ScreenOptionsEditCourseSubMenu::MenuSelect( PlayerNumber pn, const InputEventType type )
void ScreenOptionsEditCourseSubMenu::MenuSelect( const InputEventPlus &input )
{
if( type == IET_FIRST_PRESS )
if( input.type == IET_FIRST_PRESS )
{
SetNextCombination();
@@ -78,7 +78,7 @@ void ScreenOptionsEditCourseSubMenu::MenuSelect( PlayerNumber pn, const InputEve
return;
}
ScreenOptions::MenuSelect( pn, type );
ScreenOptions::MenuSelect( input );
}
@@ -343,7 +343,7 @@ void ScreenOptionsManageCourses::AfterChangeRow( PlayerNumber pn )
ScreenOptions::AfterChangeRow( pn );
}
void ScreenOptionsManageCourses::ProcessMenuStart( PlayerNumber pn, const InputEventType type )
void ScreenOptionsManageCourses::ProcessMenuStart( const InputEventPlus &input )
{
int iCurRow = m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber];
+2 -2
View File
@@ -11,7 +11,7 @@ public:
ScreenOptionsEditCourseSubMenu( CString sName );
protected:
virtual void MenuSelect( PlayerNumber pn, const InputEventType type );
virtual void MenuSelect( const InputEventPlus &input );
};
class ScreenOptionsManageCourses : public ScreenOptionsEditCourseSubMenu
@@ -29,7 +29,7 @@ protected:
virtual void ExportOptions( int iRow, const vector<PlayerNumber> &vpns );
virtual void AfterChangeRow( PlayerNumber pn );
virtual void ProcessMenuStart( PlayerNumber pn, const InputEventType type );
virtual void ProcessMenuStart( const InputEventPlus &input );
Course *GetCourseWithFocus() const;
@@ -344,7 +344,7 @@ void ScreenOptionsManageProfiles::AfterChangeRow( PlayerNumber pn )
ScreenOptions::AfterChangeRow( pn );
}
void ScreenOptionsManageProfiles::ProcessMenuStart( PlayerNumber pn, const InputEventType type )
void ScreenOptionsManageProfiles::ProcessMenuStart( const InputEventPlus &input )
{
int iCurRow = m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber];
OptionRow &row = *m_pRows[iCurRow];
+1 -1
View File
@@ -22,7 +22,7 @@ protected:
virtual void ExportOptions( int iRow, const vector<PlayerNumber> &vpns );
virtual void AfterChangeRow( PlayerNumber pn );
virtual void ProcessMenuStart( PlayerNumber pn, const InputEventType type );
virtual void ProcessMenuStart( const InputEventPlus &input );
int GetLocalProfileIndexWithFocus() const;
CString GetLocalProfileIDWithFocus() const;
+11 -9
View File
@@ -171,7 +171,7 @@ void ScreenPackages::MenuStart( PlayerNumber pn )
ScreenWithMenuElements::MenuStart( pn );
}
void ScreenPackages::MenuUp( PlayerNumber pn, const InputEventType type )
void ScreenPackages::MenuUp( const InputEventPlus &input )
{
if ( m_bIsDownloading )
return;
@@ -191,10 +191,10 @@ void ScreenPackages::MenuUp( PlayerNumber pn, const InputEventType type )
UpdateLinksList();
}
}
ScreenWithMenuElements::MenuUp( pn, type );
ScreenWithMenuElements::MenuUp( input );
}
void ScreenPackages::MenuDown( PlayerNumber pn, const InputEventType type )
void ScreenPackages::MenuDown( const InputEventPlus &input )
{
if ( m_bIsDownloading )
return;
@@ -215,10 +215,10 @@ void ScreenPackages::MenuDown( PlayerNumber pn, const InputEventType type )
UpdateLinksList();
}
}
ScreenWithMenuElements::MenuDown( pn, type );
ScreenWithMenuElements::MenuDown( input );
}
void ScreenPackages::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenPackages::MenuLeft( const InputEventPlus &input )
{
if ( m_bIsDownloading )
return;
@@ -240,15 +240,17 @@ void ScreenPackages::MenuLeft( PlayerNumber pn, const InputEventType type )
COMMAND( m_sprExistingBG, "Back" );
COMMAND( m_sprWebBG, "Away" );
}
ScreenWithMenuElements::MenuLeft( pn, type );
ScreenWithMenuElements::MenuLeft( input );
}
void ScreenPackages::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenPackages::MenuRight( const InputEventPlus &input )
{
if ( m_bIsDownloading )
return;
MenuLeft( pn, type );
ScreenWithMenuElements::MenuRight( pn, type );
/* Huh? */
MenuLeft( input );
ScreenWithMenuElements::MenuRight( input );
}
void ScreenPackages::MenuBack( PlayerNumber pn )
+4 -4
View File
@@ -19,10 +19,10 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuUp( PlayerNumber pn, const InputEventType type );
virtual void MenuDown( PlayerNumber pn, const InputEventType type );
virtual void MenuLeft( PlayerNumber pn, const InputEventType type );
virtual void MenuRight( PlayerNumber pn, const InputEventType type );
virtual void MenuUp( const InputEventPlus &input );
virtual void MenuDown( const InputEventPlus &input );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn );
virtual void TweenOffScreen( );
+2 -2
View File
@@ -186,7 +186,7 @@ void ScreenProfileOptions::HandleScreenMessage( const ScreenMessage SM )
}
void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type )
void ScreenProfileOptions::MenuStart( const InputEventPlus &input )
{
switch( GetCurrentRow() )
{
@@ -216,7 +216,7 @@ void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type
break;
}
default:
ScreenOptions::MenuStart( pn, type );
ScreenOptions::MenuStart( input );
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn, const InputEventType type );
virtual void MenuStart( const InputEventPlus &input );
private:
void ImportOptions( int iRow, const vector<PlayerNumber> &vpns );
+4 -7
View File
@@ -95,7 +95,8 @@ static void GetAllCoursesToShow( vector<Course*> &vpOut, CourseType ct, bool bSh
CString STEPS_TYPE_COLOR_NAME( size_t i ) { return ssprintf("StepsTypeColor%d",int(i+1)); }
REGISTER_SCREEN_CLASS( ScreenRanking );
ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName, false/*dont reset GAMESTATE*/ ),
ScreenRanking::ScreenRanking( CString sClassName ):
ScreenAttract( sClassName, false /*dont reset GAMESTATE*/ ),
STEPS_TYPES_TO_SHOW (m_sName,"StepsTypesToHide"),
DIFFICULTIES_TO_SHOW (m_sName,"DifficultiesToShow"),
@@ -327,10 +328,6 @@ void ScreenRanking::Init()
}
}
ScreenRanking::~ScreenRanking()
{
}
void ScreenRanking::BeginScreen()
{
SET_XY( m_textStepsType );
@@ -641,7 +638,7 @@ float ScreenRanking::SetPage( PageToShow pts )
BitmapText* pTextStepsScore = &item.m_textScore[*cd];
const Trail *pTrail = pCourse->GetTrail( pts.st, *cd );
if( pTrail && UNLOCKMAN->CourseIsLocked(pCourse) )
if( UNLOCKMAN->CourseIsLocked(pCourse) )
pTrail = NULL;
pTextStepsScore->SetHidden( pTrail==NULL );
if( pTrail == NULL )
@@ -677,7 +674,7 @@ float ScreenRanking::SetPage( PageToShow pts )
}
/*
* (c) 2001-2004 Chris Danford
* (c) 2001-2005 Chris Danford, Glenn Maynard
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
+7 -9
View File
@@ -29,7 +29,7 @@ enum PageType
const CString& PageTypeToString( PageType pt );
PageType StringToPageType( const CString& s );
const int NUM_RANKING_LINES = 5;
static const int NUM_RANKING_LINES = 5;
class ScreenRanking : public ScreenAttract
{
@@ -37,22 +37,20 @@ public:
ScreenRanking( CString sName );
virtual void Init();
virtual void BeginScreen();
~ScreenRanking();
virtual void Input( const InputEventPlus &input );
virtual void MenuLeft( PlayerNumber pn, const InputEventType type ) { Scroll(-1); }
virtual void MenuRight( PlayerNumber pn, const InputEventType type ) { Scroll(+1); }
virtual void MenuUp( PlayerNumber pn, const InputEventType type ) { Scroll(-1); }
virtual void MenuDown( PlayerNumber pn, const InputEventType type ) { Scroll(+1); }
virtual void Scroll( int iDir );
virtual void MenuLeft( const InputEventPlus &input ) { Scroll(-1); }
virtual void MenuRight( const InputEventPlus &input ) { Scroll(+1); }
virtual void MenuUp( const InputEventPlus &input ) { Scroll(-1); }
virtual void MenuDown( const InputEventPlus &input ) { Scroll(+1); }
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
void HandleScreenMessage( const ScreenMessage SM );
protected:
virtual bool GenericTweenOn() const { return true; }
virtual void Scroll( int iDir );
struct PageToShow
{
@@ -147,7 +145,7 @@ protected:
#endif
/*
* (c) 2001-2004 Chris Danford, Ben Nordstrom
* (c) 2001-2005 Chris Danford, Ben Nordstrom, Glenn Maynard
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
+2 -2
View File
@@ -156,9 +156,9 @@ void ScreenSMOnlineLogin::HandleScreenMessage(const ScreenMessage SM)
ScreenOptions::HandleScreenMessage(SM);
}
void ScreenSMOnlineLogin::MenuStart(PlayerNumber pn,const InputEventType type)
void ScreenSMOnlineLogin::MenuStart( const InputEventPlus &input )
{
ScreenOptions::MenuStart(pn,type);
ScreenOptions::MenuStart( input );
}
CString ScreenSMOnlineLogin::GetSelectedProfileID()
+1 -1
View File
@@ -9,7 +9,7 @@ public:
ScreenSMOnlineLogin(CString sName);
virtual void Init();
virtual void HandleScreenMessage(const ScreenMessage SM);
virtual void MenuStart(PlayerNumber pn,const InputEventType type);
virtual void MenuStart( const InputEventPlus &input );
void SendLogin(CString sPassword);
private:
+17 -12
View File
@@ -13,6 +13,7 @@
#include <set>
#include "Foreach.h"
#include "RageSoundManager.h"
#include "InputEventPlus.h"
AutoScreenMessage( SM_PlayPostSwitchPage )
@@ -406,13 +407,14 @@ try_again:
return ChangeSelection( pn, dir, iSwitchToIndex );
}
void ScreenSelectMaster::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenSelectMaster::MenuLeft( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
if( m_fLockInputSecs > 0 || m_bChosen[pn] )
return;
if( type == IET_RELEASE )
if( input.type == IET_RELEASE )
return;
if( !ALLOW_REPEATING_INPUT && type != IET_FIRST_PRESS )
if( !ALLOW_REPEATING_INPUT && input.type != IET_FIRST_PRESS )
return;
if( Move(pn, MENU_DIR_LEFT) )
{
@@ -421,13 +423,14 @@ void ScreenSelectMaster::MenuLeft( PlayerNumber pn, const InputEventType type )
}
}
void ScreenSelectMaster::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenSelectMaster::MenuRight( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
if( m_fLockInputSecs > 0 || m_bChosen[pn] )
return;
if( type == IET_RELEASE )
if( input.type == IET_RELEASE )
return;
if( !ALLOW_REPEATING_INPUT && type != IET_FIRST_PRESS )
if( !ALLOW_REPEATING_INPUT && input.type != IET_FIRST_PRESS )
return;
if( Move(pn, MENU_DIR_RIGHT) )
{
@@ -436,13 +439,14 @@ void ScreenSelectMaster::MenuRight( PlayerNumber pn, const InputEventType type )
}
}
void ScreenSelectMaster::MenuUp( PlayerNumber pn, const InputEventType type )
void ScreenSelectMaster::MenuUp( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
if( m_fLockInputSecs > 0 || m_bChosen[pn] )
return;
if( type == IET_RELEASE )
if( input.type == IET_RELEASE )
return;
if( !ALLOW_REPEATING_INPUT && type != IET_FIRST_PRESS )
if( !ALLOW_REPEATING_INPUT && input.type != IET_FIRST_PRESS )
return;
if( Move(pn, MENU_DIR_UP) )
{
@@ -451,13 +455,14 @@ void ScreenSelectMaster::MenuUp( PlayerNumber pn, const InputEventType type )
}
}
void ScreenSelectMaster::MenuDown( PlayerNumber pn, const InputEventType type )
void ScreenSelectMaster::MenuDown( const InputEventPlus &input )
{
PlayerNumber pn = input.MenuI.player;
if( m_fLockInputSecs > 0 || m_bChosen[pn] )
return;
if( type == IET_RELEASE )
if( input.type == IET_RELEASE )
return;
if( !ALLOW_REPEATING_INPUT && type != IET_FIRST_PRESS )
if( !ALLOW_REPEATING_INPUT && input.type != IET_FIRST_PRESS )
return;
if( Move(pn, MENU_DIR_DOWN) )
{
+4 -4
View File
@@ -18,10 +18,10 @@ public:
virtual void Update( float fDelta );
virtual void MenuLeft( PlayerNumber pn, const InputEventType type );
virtual void MenuRight( PlayerNumber pn, const InputEventType type );
virtual void MenuUp( PlayerNumber pn, const InputEventType type );
virtual void MenuDown( PlayerNumber pn, const InputEventType type );
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 MenuStart( PlayerNumber pn );
void TweenOursOnScreen();
void TweenOursOffScreen();
+8 -8
View File
@@ -854,20 +854,20 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
// Start as "move to the next screen" if it was just part of a code.
switch( input.MenuI.button )
{
case MENU_BUTTON_UP: this->MenuUp( input.MenuI.player, input.type ); break;
case MENU_BUTTON_DOWN: this->MenuDown( input.MenuI.player, input.type ); break;
case MENU_BUTTON_LEFT: this->MenuLeft( input.MenuI.player, input.type ); break;
case MENU_BUTTON_RIGHT: this->MenuRight( input.MenuI.player, input.type ); break;
case MENU_BUTTON_UP: this->MenuUp( input ); break;
case MENU_BUTTON_DOWN: this->MenuDown( input ); break;
case MENU_BUTTON_LEFT: this->MenuLeft( input ); break;
case MENU_BUTTON_RIGHT: this->MenuRight( input ); break;
case MENU_BUTTON_BACK:
/* 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 )
this->MenuBack( input.MenuI.player );
else
Screen::MenuBack( input.MenuI.player, input.type );
Screen::MenuBack( input );
break;
// Do the default handler for Start after detecting codes.
// case MENU_BUTTON_START: this->MenuStart( MenuI.player, type ); break;
case MENU_BUTTON_COIN: this->MenuCoin( input.MenuI.player, input.type ); break;
// case MENU_BUTTON_START: this->MenuStart( input ); break;
case MENU_BUTTON_COIN: this->MenuCoin( input ); break;
}
@@ -916,7 +916,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
switch( input.MenuI.button )
{
case MENU_BUTTON_START: Screen::MenuStart( input.MenuI.player, input.type ); break;
case MENU_BUTTON_START: Screen::MenuStart( input ); break;
}
}