PlayerNumber -> IEP.

This commit is contained in:
Steve Checkoway
2006-09-15 01:47:24 +00:00
parent 7dc2867dd2
commit 944a913790
45 changed files with 136 additions and 117 deletions
+3 -3
View File
@@ -920,12 +920,12 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM )
ScreenWithMenuElements::HandleScreenMessage( SM );
}
void ScreenEvaluation::MenuBack( PlayerNumber pn )
void ScreenEvaluation::MenuBack( const InputEventPlus &input )
{
MenuStart( pn );
MenuStart( input );
}
void ScreenEvaluation::MenuStart( PlayerNumber pn )
void ScreenEvaluation::MenuStart( const InputEventPlus &input )
{
m_soundStart.Play();
+2 -2
View File
@@ -47,8 +47,8 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void TweenOffScreen();
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( const InputEventPlus &input );
virtual void MenuStart( const InputEventPlus &input );
protected:
void EndScreen();
+3 -3
View File
@@ -400,7 +400,7 @@ void ScreenEz2SelectMusic::MenuRight( const InputEventPlus &input )
MusicChanged();
}
void ScreenEz2SelectMusic::MenuBack( PlayerNumber pn )
void ScreenEz2SelectMusic::MenuBack( const InputEventPlus &input )
{
SOUND->StopMusic();
@@ -446,7 +446,7 @@ void ScreenEz2SelectMusic::MenuLeft( const InputEventPlus &input )
}
static LocalizedString DOES_NOT_HAVE_MUSIC_FILE( "ScreenEz2SelectMusic", "This song does not have a music file and cannot be played." );
void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn )
void ScreenEz2SelectMusic::MenuStart( const InputEventPlus &input )
{
if( !m_MusicBannerWheel.GetSelectedSong()->HasMusic() )
{
@@ -456,7 +456,7 @@ void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn )
SCREENMAN->PlayStartSound();
if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 0)
if( (PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 0 )
{
iConfirmSelection = 1;
m_MusicBannerWheel.StartBouncing();
+2 -2
View File
@@ -20,10 +20,10 @@ public:
virtual void Update( float fDeltaTime );
virtual void Input( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuBack( const InputEventPlus &input );
protected:
void AfterNotesChange( PlayerNumber pn );
+10 -5
View File
@@ -12,6 +12,7 @@
#include "ThemeManager.h"
#include "MenuTimer.h"
#include "ScreenDimensions.h"
#include "InputEventPlus.h"
/* Constants */
#define JOIN_FRAME_X( p ) THEME->GetMetricF("ScreenEz2SelectPlayer",ssprintf("JoinFrameP%dX",p+1))
@@ -117,7 +118,9 @@ void ScreenEz2SelectPlayer::HandleScreenMessage( const ScreenMessage SM )
{
if( GAMESTATE->GetNumSidesJoined() == 0 )
{
MenuStart(PLAYER_1);
InputEventPlus iep;
iep.pn = PLAYER_1;
MenuStart(iep);
}
StartTransitioningScreen( SM_GoToNextScreen );
@@ -133,7 +136,7 @@ Desc: Actions performed when a player
presses the button bound to back
************************************/
void ScreenEz2SelectPlayer::MenuBack( PlayerNumber pn )
void ScreenEz2SelectPlayer::MenuBack( const InputEventPlus &input )
{
SOUND->StopMusic();
@@ -146,9 +149,9 @@ MenuDown
Desc: Actions performed when a player
presses the button bound to down
************************************/
void ScreenEz2SelectPlayer::MenuDown( PlayerNumber pn )
void ScreenEz2SelectPlayer::MenuDown( const InputEventPlus &input )
{
MenuStart( pn );
MenuStart( input );
}
/************************************
@@ -156,8 +159,10 @@ MenuStart
Desc: Actions performed when a player
presses the button bound to start
************************************/
void ScreenEz2SelectPlayer::MenuStart( PlayerNumber pn )
void ScreenEz2SelectPlayer::MenuStart( const InputEventPlus &input )
{
PlayerNumber pn = input.pn;
if( GAMESTATE->m_bSideIsJoined[pn] ) // already joined
return; // ignore
+3 -3
View File
@@ -18,9 +18,9 @@ public:
virtual void Input( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuDown( PlayerNumber pn );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuDown( const InputEventPlus &input );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
private:
void TweenOffScreen();
void TweenOnScreen();
+4 -2
View File
@@ -133,15 +133,17 @@ void ScreenGameplayLesson::HandleScreenMessage( const ScreenMessage SM )
ScreenGameplay::HandleScreenMessage( SM );
}
void ScreenGameplayLesson::MenuStart( PlayerNumber pn )
void ScreenGameplayLesson::MenuStart( const InputEventPlus &input )
{
// XXX: Allow repeats?
if( m_iCurrentPageIndex == -1 )
return;
ChangeLessonPage( +1 );
}
void ScreenGameplayLesson::MenuBack( PlayerNumber pn )
void ScreenGameplayLesson::MenuBack( const InputEventPlus &input )
{
// XXX: Allow repeats?
if( m_iCurrentPageIndex == 0 )
{
BeginBackingOutFromGameplay();
+2 -2
View File
@@ -15,8 +15,8 @@ public:
virtual void Input( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
protected:
void ChangeLessonPage( int iDir );
+2 -2
View File
@@ -20,12 +20,12 @@ void ScreenInstructions::Input( const InputEventPlus &input )
Screen::Input( input );
}
void ScreenInstructions::MenuBack( PlayerNumber pn )
void ScreenInstructions::MenuBack( const InputEventPlus &input )
{
Cancel( SM_GoToPrevScreen );
}
void ScreenInstructions::MenuStart( PlayerNumber pn )
void ScreenInstructions::MenuStart( const InputEventPlus &input )
{
StartTransitioningScreen( SM_GoToNextScreen );
}
+2 -2
View File
@@ -10,8 +10,8 @@ public:
virtual void Input( const InputEventPlus &input );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( const InputEventPlus &input );
virtual void MenuStart( const InputEventPlus &input );
};
+8 -2
View File
@@ -368,8 +368,12 @@ void ScreenNameEntry::HandleScreenMessage( const ScreenMessage SM )
{
if( !m_Out.IsTransitioning() )
{
InputEventPlus iep;
FOREACH_PlayerNumber( p )
this->MenuStart( p );
{
iep.pn = p;
this->MenuStart( iep );
}
}
}
else if( SM == SM_GoToNextScreen )
@@ -387,8 +391,10 @@ void ScreenNameEntry::HandleScreenMessage( const ScreenMessage SM )
}
void ScreenNameEntry::MenuStart( PlayerNumber pn )
void ScreenNameEntry::MenuStart( const InputEventPlus &input )
{
PlayerNumber pn = input.pn;
if( !m_bStillEnteringName[pn] )
return;
m_bStillEnteringName[pn] = false;
+1 -1
View File
@@ -22,7 +22,7 @@ public:
virtual void Input( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
enum { ABS_MAX_RANKING_NAME_LENGTH = 10 };
private:
+5 -5
View File
@@ -636,9 +636,9 @@ void ScreenNameEntryTraditional::UpdateSelectionText( int pn )
m_textSelection[pn].SetText( WStringToRString(text) );
}
void ScreenNameEntryTraditional::MenuStart( PlayerNumber pn )
void ScreenNameEntryTraditional::MenuStart( const InputEventPlus &input )
{
HandleStart( pn );
HandleStart( input.pn );
}
void ScreenNameEntryTraditional::HandleStart( PlayerNumber pn )
@@ -685,11 +685,11 @@ void ScreenNameEntryTraditional::HandleStart( PlayerNumber pn )
}
}
void ScreenNameEntryTraditional::MenuSelect( PlayerNumber pn )
void ScreenNameEntryTraditional::MenuSelect( const InputEventPlus &input )
{
if( !m_bStillEnteringName[pn] )
if( !m_bStillEnteringName[input.pn] )
return; // ignore
Backspace( pn );
Backspace( input.pn );
}
bool ScreenNameEntryTraditional::SelectChar( PlayerNumber pn, int c, bool bOptional )
+2 -2
View File
@@ -51,8 +51,8 @@ public:
void HandleScreenMessage( const ScreenMessage SM );
void Input( const InputEventPlus &input );
void MenuStart( PlayerNumber pn );
void MenuSelect( PlayerNumber pn );
void MenuStart( const InputEventPlus &input );
void MenuSelect( const InputEventPlus &input );
void MenuLeft( const InputEventPlus &input );
void MenuRight( const InputEventPlus &input );
+8 -4
View File
@@ -319,8 +319,10 @@ done:
ScreenNetSelectBase::HandleScreenMessage( SM );
}
void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn )
void ScreenNetSelectMusic::MenuLeft( const InputEventPlus &input )
{
PlayerNumber pn = input.pn;
bool bLeftPressed = INPUTMAPPER->IsBeingPressed( MENU_BUTTON_LEFT, pn );
bool bRightPressed = INPUTMAPPER->IsBeingPressed( MENU_BUTTON_RIGHT, pn );
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
@@ -331,8 +333,10 @@ void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn )
m_MusicWheel.Move( -1 );
}
void ScreenNetSelectMusic::MenuRight( PlayerNumber pn )
void ScreenNetSelectMusic::MenuRight( const InputEventPlus &input )
{
PlayerNumber pn = input.pn;
bool bLeftPressed = INPUTMAPPER->IsBeingPressed( MENU_BUTTON_LEFT, pn );
bool bRightPressed = INPUTMAPPER->IsBeingPressed( MENU_BUTTON_RIGHT, pn );
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
@@ -403,7 +407,7 @@ void ScreenNetSelectMusic::MenuDown( const InputEventPlus &input )
GAMESTATE->m_PreferredDifficulty[pn].Set( m_DC[pn] );
}
void ScreenNetSelectMusic::MenuStart( PlayerNumber pn )
void ScreenNetSelectMusic::MenuStart( const InputEventPlus &input )
{
bool bResult = m_MusicWheel.Select();
@@ -433,7 +437,7 @@ void ScreenNetSelectMusic::MenuStart( PlayerNumber pn )
StartSelectedSong();
}
void ScreenNetSelectMusic::MenuBack( PlayerNumber pn )
void ScreenNetSelectMusic::MenuBack( const InputEventPlus &input )
{
SOUND->StopMusic();
TweenOffScreen();
+4 -4
View File
@@ -46,12 +46,12 @@ private:
NetScreenSelectModes m_SelectMode;
protected:
virtual void MenuStart( PlayerNumber pn );
virtual void MenuLeft( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuUp( const InputEventPlus &input );
virtual void MenuDown( const InputEventPlus &input );
virtual void MenuRight( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
virtual void Update( float fDeltaTime );
+1 -1
View File
@@ -755,7 +755,7 @@ void ScreenOptions::AfterChangeValueOrRow( PlayerNumber pn )
}
void ScreenOptions::MenuBack( PlayerNumber pn )
void ScreenOptions::MenuBack( const InputEventPlus &input )
{
Cancel( SM_GoToPrevScreen );
}
+1 -1
View File
@@ -74,7 +74,7 @@ protected:
virtual void AfterChangeRow( PlayerNumber pn ); // override this to detect when the row has changed
virtual void AfterChangeValueOrRow( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuBack( const InputEventPlus &input );
virtual void MenuStart( const InputEventPlus &input );
virtual void ProcessMenuStart( const InputEventPlus &input );
virtual void MenuLeft( const InputEventPlus &input ) { ChangeValueInRowRelative(m_iCurrentRow[input.pn],input.pn,-1, input.type != IET_FIRST_PRESS); }
+3 -1
View File
@@ -72,8 +72,10 @@ void ScreenOptionsEditCourseSubMenu::Init()
ScreenOptions::Init();
}
void ScreenOptionsEditCourseSubMenu::MenuSelect( PlayerNumber pn )
void ScreenOptionsEditCourseSubMenu::MenuSelect( const InputEventPlus &input )
{
if( input.type != IET_FIRST_PRESS )
return;
SetNextCombination();
m_soundDifficultyChanged.Play();
+1 -1
View File
@@ -15,7 +15,7 @@ public:
virtual void Init();
protected:
virtual void MenuSelect( PlayerNumber pn );
virtual void MenuSelect( const InputEventPlus &input );
void WriteCourse();
};
+6 -6
View File
@@ -115,10 +115,10 @@ void ScreenPrompt::Input( const InputEventPlus &input )
switch( input.DeviceI.button )
{
case KEY_LEFT:
this->MenuLeft( input.pn );
this->MenuLeft( input );
return;
case KEY_RIGHT:
this->MenuRight( input.pn );
this->MenuRight( input );
return;
}
}
@@ -153,19 +153,19 @@ void ScreenPrompt::Change( int dir )
m_sndChange.Play();
}
void ScreenPrompt::MenuLeft( PlayerNumber pn )
void ScreenPrompt::MenuLeft( const InputEventPlus &input )
{
if( CanGoLeft() )
Change( -1 );
}
void ScreenPrompt::MenuRight( PlayerNumber pn )
void ScreenPrompt::MenuRight( const InputEventPlus &input )
{
if( CanGoRight() )
Change( +1 );
}
void ScreenPrompt::MenuStart( PlayerNumber pn )
void ScreenPrompt::MenuStart( const InputEventPlus &input )
{
if( m_Out.IsTransitioning() || m_Cancel.IsTransitioning() )
return;
@@ -173,7 +173,7 @@ void ScreenPrompt::MenuStart( PlayerNumber pn )
End( false );
}
void ScreenPrompt::MenuBack( PlayerNumber pn )
void ScreenPrompt::MenuBack( const InputEventPlus &input )
{
if( m_Out.IsTransitioning() || m_Cancel.IsTransitioning() )
return;
+4 -4
View File
@@ -39,10 +39,10 @@ protected:
bool CanGoLeft() { return m_Answer > 0; }
bool CanGoRight();
void Change( int dir );
void MenuLeft( PlayerNumber pn );
void MenuRight( PlayerNumber pn );
void MenuBack( PlayerNumber pn );
void MenuStart( PlayerNumber pn );
void MenuLeft( const InputEventPlus &input );
void MenuRight( const InputEventPlus &input );
void MenuBack( const InputEventPlus &input );
void MenuStart( const InputEventPlus &input );
virtual void End( bool bCancelled );
void PositionCursor();
+2 -2
View File
@@ -151,14 +151,14 @@ void ScreenRanking::Input( const InputEventPlus &input )
ScreenAttract::Input( input );
}
void ScreenRanking::MenuStart( PlayerNumber pn )
void ScreenRanking::MenuStart( const InputEventPlus &input )
{
if( !IsTransitioning() )
StartTransitioningScreen( SM_GoToNextScreen );
SCREENMAN->PlayStartSound();
}
void ScreenRanking::MenuBack( PlayerNumber pn )
void ScreenRanking::MenuBack( const InputEventPlus &input )
{
if( !IsTransitioning() )
StartTransitioningScreen( SM_GoToNextScreen );
+2 -2
View File
@@ -42,8 +42,8 @@ public:
virtual void BeginScreen();
virtual void Input( const InputEventPlus &input );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
void HandleScreenMessage( const ScreenMessage SM );
+1 -1
View File
@@ -258,7 +258,7 @@ void ScreenSelect::HandleMessage( const RString &sMessage )
Screen::HandleMessage( sMessage );
}
void ScreenSelect::MenuBack( PlayerNumber pn )
void ScreenSelect::MenuBack( const InputEventPlus &input )
{
Cancel( SM_GoToPrevScreen );
}
+1 -1
View File
@@ -21,7 +21,7 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void HandleMessage( const RString &sMessage );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuBack( const InputEventPlus &input );
protected:
virtual int GetSelectionIndex( PlayerNumber pn ) = 0;
+4 -4
View File
@@ -2,7 +2,7 @@
#include "ScreenSelectLanguage.h"
#include "PrefsManager.h"
#include "arch/ArchHooks/ArchHooks.h"
#include "InputEventPlus.h"
REGISTER_SCREEN_CLASS( ScreenSelectLanguage );
@@ -45,9 +45,9 @@ void ScreenSelectLanguage::BeginScreen()
this->HandleScreenMessage( SM_GoToNextScreen );
}
void ScreenSelectLanguage::MenuStart( PlayerNumber pn )
void ScreenSelectLanguage::MenuStart( const InputEventPlus &input )
{
int iIndex = this->GetSelectionIndex( pn );
int iIndex = this->GetSelectionIndex( input.pn );
RString sLangCode = m_aGameCommands[iIndex].m_sName;
PREFSMAN->m_sLanguage.Set( sLangCode );
PREFSMAN->SavePrefsToDisk();
@@ -57,7 +57,7 @@ void ScreenSelectLanguage::MenuStart( PlayerNumber pn )
this->PostScreenMessage( SM_BeginFadingOut, 0 );
}
void ScreenSelectLanguage::MenuBack( PlayerNumber pn )
void ScreenSelectLanguage::MenuBack( const InputEventPlus &input )
{
return; // ignore the press
}
+2 -2
View File
@@ -10,8 +10,8 @@ public:
virtual void Init();
virtual RString GetDefaultChoice();
virtual void BeginScreen();
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
};
#endif
+7 -7
View File
@@ -443,9 +443,9 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
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.pn );
this->MenuBack( input );
else
Screen::MenuBack( input );
ScreenWithMenuElements::MenuBack( input );
break;
// Do the default handler for Start after detecting codes.
// case MENU_BUTTON_START: this->MenuStart( input ); break;
@@ -582,7 +582,7 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
{
if( m_MusicWheel.IsRouletting() )
{
MenuStart(PLAYER_INVALID);
MenuStart( InputEventPlus() );
m_MenuTimer->SetSeconds( 15 );
m_MenuTimer->Start();
}
@@ -596,7 +596,7 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
}
else
{
MenuStart(PLAYER_INVALID);
MenuStart( InputEventPlus() );
}
}
else
@@ -607,7 +607,7 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
if( m_MusicWheel.GetSelectedSong() == NULL && m_MusicWheel.GetSelectedCourse() == NULL )
m_MusicWheel.StartRandom();
MenuStart(PLAYER_INVALID);
MenuStart( InputEventPlus() );
}
return;
}
@@ -651,7 +651,7 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
ScreenWithMenuElements::HandleScreenMessage( SM );
}
void ScreenSelectMusic::MenuStart( PlayerNumber pn )
void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
{
/* If false, we don't have a selection just yet. */
if( !m_MusicWheel.Select() )
@@ -753,7 +753,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn )
}
void ScreenSelectMusic::MenuBack( PlayerNumber pn )
void ScreenSelectMusic::MenuBack( const InputEventPlus &input )
{
m_BackgroundLoader.Abort();
+2 -2
View File
@@ -28,8 +28,8 @@ public:
virtual void Input( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
/* ScreenWithMenuElements override: never play music here; we do it ourself. */
virtual void StartPlayingMusic() { }
+5 -5
View File
@@ -11,7 +11,7 @@
#include "LightsManager.h"
#include "CommonMetrics.h"
#include "LocalizedString.h"
#include "InputEventPlus.h"
#define ICON_GAIN_FOCUS_COMMAND THEME->GetMetricA(m_sName,"IconGainFocusCommand")
#define ICON_LOSE_FOCUS_COMMAND THEME->GetMetricA(m_sName,"IconLoseFocusCommand")
@@ -151,7 +151,7 @@ void ScreenSelectStyle::BeginScreen()
ScreenSelect::BeginScreen();
}
void ScreenSelectStyle::MenuLeft( PlayerNumber pn )
void ScreenSelectStyle::MenuLeft( const InputEventPlus &input )
{
int iSwitchToIndex = -1; // -1 means none found
for( int i=m_iSelection-1; i>=0; i-- )
@@ -172,7 +172,7 @@ void ScreenSelectStyle::MenuLeft( PlayerNumber pn )
AfterChange();
}
void ScreenSelectStyle::MenuRight( PlayerNumber pn )
void ScreenSelectStyle::MenuRight( const InputEventPlus &input )
{
int iSwitchToIndex = -1; // -1 means none found
for( unsigned i=m_iSelection+1; i<m_aGameCommands.size(); i++ )
@@ -193,7 +193,7 @@ void ScreenSelectStyle::MenuRight( PlayerNumber pn )
AfterChange();
}
void ScreenSelectStyle::MenuStart( PlayerNumber pn )
void ScreenSelectStyle::MenuStart( const InputEventPlus &input )
{
/* Stop all tweens where they are, since we might have selected before
* we finished tweening in. */
@@ -203,7 +203,7 @@ void ScreenSelectStyle::MenuStart( PlayerNumber pn )
SCREENMAN->PlayStartSound();
SCREENMAN->SendMessageToTopScreen( SM_BeginFadingOut );
const GameCommand& mc = m_aGameCommands[GetSelectionIndex(pn)];
const GameCommand& mc = m_aGameCommands[GetSelectionIndex(input.pn)];
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("%s comment %s",m_sName.c_str(),mc.m_sName.c_str())) );
//
+3 -3
View File
@@ -16,9 +16,9 @@ public:
virtual void Init();
virtual void BeginScreen();
virtual void MenuLeft( PlayerNumber pn );
virtual void MenuRight( PlayerNumber pn );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuStart( const InputEventPlus &input );
protected:
virtual int GetSelectionIndex( PlayerNumber pn );
+2 -2
View File
@@ -44,14 +44,14 @@ void ScreenSplash::HandleScreenMessage( const ScreenMessage SM )
ScreenWithMenuElements::HandleScreenMessage( SM );
}
void ScreenSplash::MenuBack( PlayerNumber pn )
void ScreenSplash::MenuBack( const InputEventPlus &input )
{
if( IsTransitioning() )
return;
Cancel( SM_GoToPrevScreen );
}
void ScreenSplash::MenuStart( PlayerNumber pn )
void ScreenSplash::MenuStart( const InputEventPlus &input )
{
if( IsTransitioning() )
return;
+2 -2
View File
@@ -12,8 +12,8 @@ public:
virtual void Init();
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( const InputEventPlus &input );
virtual void MenuStart( const InputEventPlus &input );
protected:
ThemeMetric<bool> ALLOW_START_TO_SKIP;
+1 -1
View File
@@ -99,7 +99,7 @@ void ScreenStage::Update( float fDeltaTime )
Screen::Update( fDeltaTime );
}
void ScreenStage::MenuBack( PlayerNumber pn )
void ScreenStage::MenuBack( const InputEventPlus &input )
{
if( m_In.IsTransitioning() || m_Out.IsTransitioning() || m_Cancel.IsTransitioning() )
return;
+1 -1
View File
@@ -15,7 +15,7 @@ public:
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void Update( float fDeltaTime );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuBack( const InputEventPlus &input );
private:
ThemeMetric<bool> ALLOW_BACK;
+3 -3
View File
@@ -110,12 +110,12 @@ void ScreenTestInput::Input( const InputEventPlus &input )
Screen::Input( input ); // default handler
}
void ScreenTestInput::MenuStart( PlayerNumber pn )
void ScreenTestInput::MenuStart( const InputEventPlus &input )
{
MenuBack(pn);
MenuBack( input );
}
void ScreenTestInput::MenuBack( PlayerNumber pn )
void ScreenTestInput::MenuBack( const InputEventPlus &input )
{
if( !IsTransitioning() )
{
+2 -2
View File
@@ -12,8 +12,8 @@ class ScreenTestInput : public ScreenWithMenuElements
public:
virtual void Input( const InputEventPlus &input );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
};
#endif
+8 -8
View File
@@ -102,34 +102,34 @@ void ScreenTestLights::HandleScreenMessage( const ScreenMessage SM )
LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );
}
void ScreenTestLights::MenuLeft( PlayerNumber pn )
void ScreenTestLights::MenuLeft( const InputEventPlus &input )
{
LIGHTSMAN->SetLightsMode( LIGHTSMODE_TEST_MANUAL_CYCLE );
if( pn == PLAYER_1 )
if( input.pn == PLAYER_1 )
LIGHTSMAN->PrevTestCabinetLight();
else
LIGHTSMAN->PrevTestGameButtonLight();
m_timerBackToAutoCycle.Touch();
}
void ScreenTestLights::MenuRight( PlayerNumber pn )
void ScreenTestLights::MenuRight( const InputEventPlus &input )
{
LIGHTSMAN->SetLightsMode( LIGHTSMODE_TEST_MANUAL_CYCLE );
if( pn == PLAYER_1 )
if( input.pn == PLAYER_1 )
LIGHTSMAN->NextTestCabinetLight();
else
LIGHTSMAN->NextTestGameButtonLight();
m_timerBackToAutoCycle.Touch();
}
void ScreenTestLights::MenuStart( PlayerNumber pn )
void ScreenTestLights::MenuStart( const InputEventPlus &input )
{
MenuBack(pn);
MenuBack( input );
}
void ScreenTestLights::MenuBack( PlayerNumber pn )
void ScreenTestLights::MenuBack( const InputEventPlus &input )
{
if(!IsTransitioning())
if( !IsTransitioning() )
{
SCREENMAN->PlayStartSound();
OFF_COMMAND( m_textInputs );
+4 -4
View File
@@ -15,10 +15,10 @@ public:
virtual void Input( const InputEventPlus &input );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuLeft( PlayerNumber pn );
virtual void MenuRight( PlayerNumber pn );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
virtual void MenuLeft( const InputEventPlus &input );
virtual void MenuRight( const InputEventPlus &input );
virtual void MenuStart( const InputEventPlus &input );
virtual void MenuBack( const InputEventPlus &input );
private:
BitmapText m_textInputs;
+1 -1
View File
@@ -46,7 +46,7 @@ void ScreenUnlockBrowse::BeginScreen()
HandleMessage( MessageToString(Message_MenuSelectionChanged) );
}
void ScreenUnlockBrowse::MenuStart( PlayerNumber pn )
void ScreenUnlockBrowse::MenuStart( const InputEventPlus &input )
{
m_soundStart.Play();
this->PostScreenMessage( SM_BeginFadingOut, 0 );
+1 -1
View File
@@ -9,7 +9,7 @@ class ScreenUnlockBrowse : public ScreenSelectMaster
public:
virtual void Init();
virtual void BeginScreen();
virtual void MenuStart( PlayerNumber pn );
virtual void MenuStart( const InputEventPlus &input );
virtual void TweenOnScreen();
virtual void TweenOffScreen();
+1 -1
View File
@@ -11,7 +11,7 @@ public:
virtual void MenuRight( const InputEventPlus &input ) { }
virtual void MenuUp( const InputEventPlus &input ) { }
virtual void MenuDown( const InputEventPlus &input ) { }
virtual void MenuBack( PlayerNumber pn ) { MenuStart( pn ); }
virtual void MenuBack( const InputEventPlus &input ) { MenuStart( input ); }
protected:
};
+2 -2
View File
@@ -321,7 +321,7 @@ void ScreenWithMenuElements::StopTimer()
REGISTER_SCREEN_CLASS( ScreenWithMenuElementsSimple );
void ScreenWithMenuElementsSimple::MenuStart( PlayerNumber pn )
void ScreenWithMenuElementsSimple::MenuStart( const InputEventPlus &input )
{
if( IsTransitioning() )
return;
@@ -333,7 +333,7 @@ void ScreenWithMenuElementsSimple::MenuStart( PlayerNumber pn )
SCREENMAN->ConcurrentlyPrepareScreen( GetNextScreen() );
}
void ScreenWithMenuElementsSimple::MenuBack( PlayerNumber pn )
void ScreenWithMenuElementsSimple::MenuBack( const InputEventPlus &input )
{
if( IsTransitioning() )
return;
+2 -2
View File
@@ -71,8 +71,8 @@ private:
class ScreenWithMenuElementsSimple: public ScreenWithMenuElements
{
public:
void MenuStart( PlayerNumber pn );
void MenuBack( PlayerNumber pn );
void MenuStart( const InputEventPlus &input );
void MenuBack( const InputEventPlus &input );
//
// Lua