From 033080e3cc17783857ba3166702aef1e5e14d157 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 30 Mar 2006 00:19:19 +0000 Subject: [PATCH] Invert this: instead of "use menu if present, otherwise keyboard", prefer keyboard. That's gives more intuitive behavior if menu inputs are mapped on alpha keys. --- stepmania/src/ScreenNameEntryTraditional.cpp | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/stepmania/src/ScreenNameEntryTraditional.cpp b/stepmania/src/ScreenNameEntryTraditional.cpp index a1f4a3ec8b..6690878c0e 100644 --- a/stepmania/src/ScreenNameEntryTraditional.cpp +++ b/stepmania/src/ScreenNameEntryTraditional.cpp @@ -508,28 +508,28 @@ void ScreenNameEntryTraditional::Input( const InputEventPlus &input ) if( IsTransitioning() ) return; - if( input.MenuI.IsValid() ) - { - ScreenWithMenuElements::Input( input ); - } - else - { - if( input.DeviceI.device == DEVICE_KEYBOARD && input.type == IET_FIRST_PRESS ) - { - char c = -1; - if( input.DeviceI.button == KEY_BACK ) - c = CHAR_BACK; - else - c = toupper( input.DeviceI.ToChar() ); - bool bChanged = SelectChar( GAMESTATE->m_MasterPlayerNumber, c, true ); + if( input.type == IET_FIRST_PRESS ) + { + int c; + if( input.DeviceI == DeviceInput(DEVICE_KEYBOARD, KEY_BACK) ) + c = CHAR_BACK; + else + c = toupper( input.DeviceI.ToChar() ); + if( c ) + { + PlayerNumber pn = GAMESTATE->m_MasterPlayerNumber; + bool bChanged = SelectChar( pn, c, true ); if( bChanged ) { m_soundChange.Play(); HandleStart( GAMESTATE->m_MasterPlayerNumber ); } + return; } } + + ScreenWithMenuElements::Input( input ); } void ScreenNameEntryTraditional::ChangeDisplayedFeat()