handle IET_LEVEL_CHANGED
This commit is contained in:
@@ -109,7 +109,15 @@ void Screen::MenuBack( PlayerNumber pn, const InputEventType type )
|
||||
void Screen::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||
{
|
||||
/* Don't send release messages with the default handler. */
|
||||
if(type == IET_RELEASE) return; // don't care
|
||||
switch( type )
|
||||
{
|
||||
case IET_FIRST_PRESS:
|
||||
case IET_SLOW_REPEAT:
|
||||
case IET_FAST_REPEAT:
|
||||
break; /* OK */
|
||||
default:
|
||||
return; // don't care
|
||||
}
|
||||
|
||||
/* Don't make the user hold the back button if they're pressing escape and escape is the back button. */
|
||||
if( MenuI.button == MENU_BUTTON_BACK && DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == KEY_ESC )
|
||||
|
||||
@@ -664,6 +664,9 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
if( DeviceI.device != DEVICE_KEYBOARD )
|
||||
return;
|
||||
|
||||
if( type == IET_LEVEL_CHANGED )
|
||||
return; // don't care
|
||||
|
||||
if(type == IET_RELEASE)
|
||||
{
|
||||
switch( DeviceI.button ) {
|
||||
|
||||
@@ -231,7 +231,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
||||
|
||||
if(i_ErrorDetected) return; // don't let the user do anything if theres an error
|
||||
|
||||
if( type == IET_RELEASE ) return; // don't care
|
||||
if( type == IET_RELEASE || type == IET_LEVEL_CHANGED ) return; // don't care
|
||||
|
||||
if( IsTransitioning() ) return; // ignore
|
||||
|
||||
|
||||
@@ -1619,6 +1619,9 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
||||
{
|
||||
//LOG->Trace( "ScreenGameplay::Input()" );
|
||||
|
||||
if( type == IET_LEVEL_CHANGED )
|
||||
return;
|
||||
|
||||
if( MenuI.IsValid() &&
|
||||
m_DancingState != STATE_OUTRO &&
|
||||
!m_Back.IsTransitioning() )
|
||||
|
||||
@@ -162,9 +162,6 @@ void ScreenMiniMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
void ScreenMiniMenu::MenuUp( PlayerNumber pn, const InputEventType type )
|
||||
{
|
||||
if( type == IET_RELEASE )
|
||||
return;
|
||||
|
||||
if( GetGoUpSpot() != -1 )
|
||||
{
|
||||
BeforeLineChanged();
|
||||
@@ -175,9 +172,6 @@ void ScreenMiniMenu::MenuUp( PlayerNumber pn, const InputEventType type )
|
||||
|
||||
void ScreenMiniMenu::MenuDown( PlayerNumber pn, const InputEventType type )
|
||||
{
|
||||
if( type == IET_RELEASE )
|
||||
return;
|
||||
|
||||
if( GetGoDownSpot() != -1 )
|
||||
{
|
||||
BeforeLineChanged();
|
||||
@@ -188,9 +182,6 @@ void ScreenMiniMenu::MenuDown( PlayerNumber pn, const InputEventType type )
|
||||
|
||||
void ScreenMiniMenu::MenuLeft( PlayerNumber pn, const InputEventType type )
|
||||
{
|
||||
if( type == IET_RELEASE )
|
||||
return;
|
||||
|
||||
if( CanGoLeft() )
|
||||
{
|
||||
m_iCurAnswers[m_iCurLine]--;
|
||||
@@ -200,9 +191,6 @@ void ScreenMiniMenu::MenuLeft( PlayerNumber pn, const InputEventType type )
|
||||
|
||||
void ScreenMiniMenu::MenuRight( PlayerNumber pn, const InputEventType type )
|
||||
{
|
||||
if( type == IET_RELEASE )
|
||||
return;
|
||||
|
||||
if( CanGoRight() )
|
||||
{
|
||||
m_iCurAnswers[m_iCurLine]++;
|
||||
@@ -212,9 +200,6 @@ void ScreenMiniMenu::MenuRight( PlayerNumber pn, const InputEventType type )
|
||||
|
||||
void ScreenMiniMenu::MenuStart( PlayerNumber pn, const InputEventType type )
|
||||
{
|
||||
if( type == IET_RELEASE )
|
||||
return;
|
||||
|
||||
m_Out.StartTransitioning( SM_GoToOK );
|
||||
|
||||
SCREENMAN->PlayStartSound();
|
||||
|
||||
@@ -660,8 +660,6 @@ void ScreenNameEntryTraditional::MenuLeft( PlayerNumber pn, const InputEventType
|
||||
{
|
||||
if( !m_bStillEnteringName[pn] || IsTransitioning() )
|
||||
return;
|
||||
if( type == IET_RELEASE )
|
||||
return; // ignore
|
||||
|
||||
--m_SelectedChar[pn];
|
||||
wrap( m_SelectedChar[pn], m_textAlphabet[pn].size() );
|
||||
@@ -673,8 +671,6 @@ void ScreenNameEntryTraditional::MenuRight( PlayerNumber pn, const InputEventTyp
|
||||
{
|
||||
if( !m_bStillEnteringName[pn] || IsTransitioning() )
|
||||
return;
|
||||
if( type == IET_RELEASE )
|
||||
return; // ignore
|
||||
|
||||
++m_SelectedChar[pn];
|
||||
wrap( m_SelectedChar[pn], m_textAlphabet[pn].size() );
|
||||
|
||||
Reference in New Issue
Block a user