cleanup (never compare DeviceI.button against KEY_* unless you first check that it's a keyboard)

This commit is contained in:
Glenn Maynard
2005-02-02 05:57:26 +00:00
parent 18f81721e6
commit 32f829d42c
2 changed files with 15 additions and 22 deletions
+1 -22
View File
@@ -182,28 +182,7 @@ void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType ty
case '/': c='?'; break;
}
}
//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;