handle IET_LEVEL_CHANGED

This commit is contained in:
Glenn Maynard
2004-09-09 22:21:50 +00:00
parent 4e5077ef84
commit 649b3df153
6 changed files with 16 additions and 21 deletions
+9 -1
View File
@@ -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 ) 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. */ /* 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. */ /* 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 ) if( MenuI.button == MENU_BUTTON_BACK && DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == KEY_ESC )
+3
View File
@@ -664,6 +664,9 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
if( DeviceI.device != DEVICE_KEYBOARD ) if( DeviceI.device != DEVICE_KEYBOARD )
return; return;
if( type == IET_LEVEL_CHANGED )
return; // don't care
if(type == IET_RELEASE) if(type == IET_RELEASE)
{ {
switch( DeviceI.button ) { switch( DeviceI.button ) {
+1 -1
View File
@@ -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(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 if( IsTransitioning() ) return; // ignore
+3
View File
@@ -1619,6 +1619,9 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
{ {
//LOG->Trace( "ScreenGameplay::Input()" ); //LOG->Trace( "ScreenGameplay::Input()" );
if( type == IET_LEVEL_CHANGED )
return;
if( MenuI.IsValid() && if( MenuI.IsValid() &&
m_DancingState != STATE_OUTRO && m_DancingState != STATE_OUTRO &&
!m_Back.IsTransitioning() ) !m_Back.IsTransitioning() )
-15
View File
@@ -162,9 +162,6 @@ void ScreenMiniMenu::HandleScreenMessage( const ScreenMessage SM )
void ScreenMiniMenu::MenuUp( PlayerNumber pn, const InputEventType type ) void ScreenMiniMenu::MenuUp( PlayerNumber pn, const InputEventType type )
{ {
if( type == IET_RELEASE )
return;
if( GetGoUpSpot() != -1 ) if( GetGoUpSpot() != -1 )
{ {
BeforeLineChanged(); BeforeLineChanged();
@@ -175,9 +172,6 @@ void ScreenMiniMenu::MenuUp( PlayerNumber pn, const InputEventType type )
void ScreenMiniMenu::MenuDown( PlayerNumber pn, const InputEventType type ) void ScreenMiniMenu::MenuDown( PlayerNumber pn, const InputEventType type )
{ {
if( type == IET_RELEASE )
return;
if( GetGoDownSpot() != -1 ) if( GetGoDownSpot() != -1 )
{ {
BeforeLineChanged(); BeforeLineChanged();
@@ -188,9 +182,6 @@ void ScreenMiniMenu::MenuDown( PlayerNumber pn, const InputEventType type )
void ScreenMiniMenu::MenuLeft( PlayerNumber pn, const InputEventType type ) void ScreenMiniMenu::MenuLeft( PlayerNumber pn, const InputEventType type )
{ {
if( type == IET_RELEASE )
return;
if( CanGoLeft() ) if( CanGoLeft() )
{ {
m_iCurAnswers[m_iCurLine]--; m_iCurAnswers[m_iCurLine]--;
@@ -200,9 +191,6 @@ void ScreenMiniMenu::MenuLeft( PlayerNumber pn, const InputEventType type )
void ScreenMiniMenu::MenuRight( PlayerNumber pn, const InputEventType type ) void ScreenMiniMenu::MenuRight( PlayerNumber pn, const InputEventType type )
{ {
if( type == IET_RELEASE )
return;
if( CanGoRight() ) if( CanGoRight() )
{ {
m_iCurAnswers[m_iCurLine]++; m_iCurAnswers[m_iCurLine]++;
@@ -212,9 +200,6 @@ void ScreenMiniMenu::MenuRight( PlayerNumber pn, const InputEventType type )
void ScreenMiniMenu::MenuStart( PlayerNumber pn, const InputEventType type ) void ScreenMiniMenu::MenuStart( PlayerNumber pn, const InputEventType type )
{ {
if( type == IET_RELEASE )
return;
m_Out.StartTransitioning( SM_GoToOK ); m_Out.StartTransitioning( SM_GoToOK );
SCREENMAN->PlayStartSound(); SCREENMAN->PlayStartSound();
@@ -660,8 +660,6 @@ void ScreenNameEntryTraditional::MenuLeft( PlayerNumber pn, const InputEventType
{ {
if( !m_bStillEnteringName[pn] || IsTransitioning() ) if( !m_bStillEnteringName[pn] || IsTransitioning() )
return; return;
if( type == IET_RELEASE )
return; // ignore
--m_SelectedChar[pn]; --m_SelectedChar[pn];
wrap( m_SelectedChar[pn], m_textAlphabet[pn].size() ); wrap( m_SelectedChar[pn], m_textAlphabet[pn].size() );
@@ -673,8 +671,6 @@ void ScreenNameEntryTraditional::MenuRight( PlayerNumber pn, const InputEventTyp
{ {
if( !m_bStillEnteringName[pn] || IsTransitioning() ) if( !m_bStillEnteringName[pn] || IsTransitioning() )
return; return;
if( type == IET_RELEASE )
return; // ignore
++m_SelectedChar[pn]; ++m_SelectedChar[pn];
wrap( m_SelectedChar[pn], m_textAlphabet[pn].size() ); wrap( m_SelectedChar[pn], m_textAlphabet[pn].size() );