Simplify.
This commit is contained in:
@@ -634,11 +634,8 @@ void ScreenNameEntryTraditional::UpdateSelectionText( int pn )
|
|||||||
m_textSelection[pn].SetText( WStringToRString(text) );
|
m_textSelection[pn].SetText( WStringToRString(text) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenNameEntryTraditional::MenuStart( const InputEventPlus &input )
|
void ScreenNameEntryTraditional::MenuStart( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
if( input.type != IET_FIRST_PRESS )
|
|
||||||
return; // ignore
|
|
||||||
|
|
||||||
HandleStart( input.MenuI.player );
|
HandleStart( input.MenuI.player );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -686,15 +683,10 @@ void ScreenNameEntryTraditional::HandleStart( PlayerNumber pn )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenNameEntryTraditional::MenuSelect( const InputEventPlus &input )
|
void ScreenNameEntryTraditional::MenuSelect( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
PlayerNumber pn = input.MenuI.player;
|
|
||||||
|
|
||||||
if( !m_bStillEnteringName[pn] )
|
if( !m_bStillEnteringName[pn] )
|
||||||
return; // ignore
|
return; // ignore
|
||||||
if( input.type != IET_FIRST_PRESS )
|
|
||||||
return; // ignore
|
|
||||||
|
|
||||||
Backspace( pn );
|
Backspace( pn );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ public:
|
|||||||
void HandleScreenMessage( const ScreenMessage SM );
|
void HandleScreenMessage( const ScreenMessage SM );
|
||||||
void Input( const InputEventPlus &input );
|
void Input( const InputEventPlus &input );
|
||||||
|
|
||||||
void MenuStart( const InputEventPlus &input );
|
void MenuStart( PlayerNumber pn );
|
||||||
void MenuSelect( const InputEventPlus &input );
|
void MenuSelect( PlayerNumber pn );
|
||||||
void MenuLeft( const InputEventPlus &input );
|
void MenuLeft( const InputEventPlus &input );
|
||||||
void MenuRight( const InputEventPlus &input );
|
void MenuRight( const InputEventPlus &input );
|
||||||
|
|
||||||
|
|||||||
@@ -318,35 +318,29 @@ done:
|
|||||||
ScreenNetSelectBase::HandleScreenMessage( SM );
|
ScreenNetSelectBase::HandleScreenMessage( SM );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenNetSelectMusic::MenuLeft( const InputEventPlus &input )
|
void ScreenNetSelectMusic::MenuLeft( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
bool bLeftPressed = INPUTMAPPER->IsButtonDown( MenuInput(input.MenuI.player, MENU_BUTTON_LEFT) );
|
bool bLeftPressed = INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_LEFT) );
|
||||||
bool bRightPressed = INPUTMAPPER->IsButtonDown( MenuInput(input.MenuI.player, MENU_BUTTON_RIGHT) );
|
bool bRightPressed = INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_RIGHT) );
|
||||||
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
||||||
|
|
||||||
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( const InputEventPlus &input )
|
void ScreenNetSelectMusic::MenuRight( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
bool bLeftPressed = INPUTMAPPER->IsButtonDown( MenuInput (input.MenuI.player, MENU_BUTTON_LEFT) );
|
bool bLeftPressed = INPUTMAPPER->IsButtonDown( MenuInput (pn, MENU_BUTTON_LEFT) );
|
||||||
bool bRightPressed = INPUTMAPPER->IsButtonDown( MenuInput(input.MenuI.player, MENU_BUTTON_RIGHT) ) ;
|
bool bRightPressed = INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_RIGHT) ) ;
|
||||||
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
||||||
|
|
||||||
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( const InputEventPlus &input )
|
void ScreenNetSelectMusic::MenuUp( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ private:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void MenuStart( PlayerNumber pn );
|
virtual void MenuStart( PlayerNumber pn );
|
||||||
virtual void MenuLeft( const InputEventPlus &input );
|
virtual void MenuLeft( PlayerNumber pn );
|
||||||
virtual void MenuUp( const InputEventPlus &input );
|
virtual void MenuUp( const InputEventPlus &input );
|
||||||
virtual void MenuDown( const InputEventPlus &input );
|
virtual void MenuDown( const InputEventPlus &input );
|
||||||
virtual void MenuRight( const InputEventPlus &input );
|
virtual void MenuRight( PlayerNumber pn );
|
||||||
virtual void MenuBack( PlayerNumber pn );
|
virtual void MenuBack( PlayerNumber pn );
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -145,8 +145,6 @@ void ScreenNetworkOptions::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
void ScreenNetworkOptions::MenuStart( const InputEventPlus &input )
|
void ScreenNetworkOptions::MenuStart( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
#if defined( WITHOUT_NETWORKING )
|
|
||||||
#else
|
|
||||||
switch( GetCurrentRow() )
|
switch( GetCurrentRow() )
|
||||||
{
|
{
|
||||||
case PO_CONNECTION:
|
case PO_CONNECTION:
|
||||||
@@ -201,7 +199,6 @@ void ScreenNetworkOptions::MenuStart( const InputEventPlus &input )
|
|||||||
default:
|
default:
|
||||||
ScreenOptions::MenuStart( input );
|
ScreenOptions::MenuStart( input );
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenNetworkOptions::ImportOptions( int iRow, const vector<PlayerNumber> &vpns ) { }
|
void ScreenNetworkOptions::ImportOptions( int iRow, const vector<PlayerNumber> &vpns ) { }
|
||||||
|
|||||||
@@ -72,13 +72,10 @@ void ScreenOptionsEditCourseSubMenu::Init()
|
|||||||
ScreenOptions::Init();
|
ScreenOptions::Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptionsEditCourseSubMenu::MenuSelect( const InputEventPlus &input )
|
void ScreenOptionsEditCourseSubMenu::MenuSelect( PlayerNumber pn )
|
||||||
{
|
|
||||||
if( input.type == IET_FIRST_PRESS )
|
|
||||||
{
|
{
|
||||||
SetNextCombination();
|
SetNextCombination();
|
||||||
m_soundDifficultyChanged.Play();
|
m_soundDifficultyChanged.Play();
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public:
|
|||||||
virtual void Init();
|
virtual void Init();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void MenuSelect( const InputEventPlus &input );
|
virtual void MenuSelect( PlayerNumber pn );
|
||||||
void WriteCourse();
|
void WriteCourse();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user