From fbce850d92bc72b6a67fa7d89435443b342c0f87 Mon Sep 17 00:00:00 2001 From: Charles Lohr Date: Wed, 2 Feb 2005 04:47:31 +0000 Subject: [PATCH] Readd: Numpad support --- stepmania/src/ScreenTextEntry.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/stepmania/src/ScreenTextEntry.cpp b/stepmania/src/ScreenTextEntry.cpp index 7316b44703..046689a37c 100644 --- a/stepmania/src/ScreenTextEntry.cpp +++ b/stepmania/src/ScreenTextEntry.cpp @@ -183,6 +183,27 @@ void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType ty } } + //In the event we are using the numpad... + switch ( DeviceI.button ) + { + case KEY_KP_C0: c='0'; break; + case KEY_KP_C1: c='1'; break; + case KEY_KP_C2: c='2'; break; + case KEY_KP_C3: c='3'; break; + case KEY_KP_C4: c='4'; break; + case KEY_KP_C5: c='5'; break; + case KEY_KP_C6: c='6'; break; + case KEY_KP_C7: c='7'; break; + case KEY_KP_C8: c='8'; break; + case KEY_KP_C9: c='9'; break; + case KEY_KP_SLASH: c='/'; break; + case KEY_KP_ASTERISK: c='*'; break; + case KEY_KP_HYPHEN: c='-'; break; + case KEY_KP_PLUS: c='+'; break; + case KEY_KP_PERIOD: c='.'; break; + case KEY_KP_EQUAL: c='='; break; + } + if( c >= ' ' ) { m_sAnswer += c;