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