alright, now mouse support is getting somewhere.

This commit is contained in:
AJ Kelly
2011-02-23 04:33:55 -06:00
parent 471236d29d
commit d78b379464
5 changed files with 79 additions and 41 deletions
+22 -22
View File
@@ -106,18 +106,18 @@ wchar_t InputHandler::DeviceButtonToChar( DeviceButton button, bool bUseCurrentK
return c;
}
static LocalizedString HOME ( "DeviceButton", "Home" );
static LocalizedString HOME ( "DeviceButton", "Home" );
static LocalizedString END ( "DeviceButton", "End" );
static LocalizedString UP ( "DeviceButton", "Up" );
static LocalizedString DOWN ( "DeviceButton", "Down" );
static LocalizedString SPACE ( "DeviceButton", "Space" );
static LocalizedString SHIFT ( "DeviceButton", "Shift" );
static LocalizedString CTRL ( "DeviceButton", "Ctrl" );
static LocalizedString DOWN ( "DeviceButton", "Down" );
static LocalizedString SPACE ( "DeviceButton", "Space" );
static LocalizedString SHIFT ( "DeviceButton", "Shift" );
static LocalizedString CTRL ( "DeviceButton", "Ctrl" );
static LocalizedString ALT ( "DeviceButton", "Alt" );
static LocalizedString INSERT ( "DeviceButton", "Insert" );
static LocalizedString INSERT ( "DeviceButton", "Insert" );
static LocalizedString DEL ( "DeviceButton", "Delete" );
static LocalizedString PGUP ( "DeviceButton", "PgUp" );
static LocalizedString PGDN ( "DeviceButton", "PgDn" );
static LocalizedString PGUP ( "DeviceButton", "PgUp" );
static LocalizedString PGDN ( "DeviceButton", "PgDn" );
static LocalizedString BACKSLASH ( "DeviceButton", "Backslash" );
RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
@@ -128,7 +128,7 @@ RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
if( di.device == DEVICE_KEYBOARD )
{
wchar_t c = DeviceButtonToChar( di.button, false );
if( c && c != L' ' ) // Don't show "Key " for space.
if( c && c != L' ' ) // Don't show "Key " for space.
return InputDeviceToString( di.device ) + " " + Capitalize( WStringToRString(wstring()+c) );
}
@@ -142,19 +142,19 @@ RString InputHandler::GetLocalizedInputString( const DeviceInput &di )
{
switch( di.button )
{
case KEY_HOME: return HOME.GetValue();
case KEY_END: return END.GetValue();
case KEY_UP: return UP.GetValue();
case KEY_DOWN: return DOWN.GetValue();
case KEY_SPACE: return SPACE.GetValue();
case KEY_LSHIFT: case KEY_RSHIFT: return SHIFT.GetValue();
case KEY_LCTRL: case KEY_RCTRL: return CTRL.GetValue();
case KEY_LALT: case KEY_RALT: return ALT.GetValue();
case KEY_INSERT: return INSERT.GetValue();
case KEY_DEL: return DEL.GetValue();
case KEY_PGUP: return PGUP.GetValue();
case KEY_PGDN: return PGDN.GetValue();
case KEY_BACKSLASH: return BACKSLASH.GetValue();
case KEY_HOME: return HOME.GetValue();
case KEY_END: return END.GetValue();
case KEY_UP: return UP.GetValue();
case KEY_DOWN: return DOWN.GetValue();
case KEY_SPACE: return SPACE.GetValue();
case KEY_LSHIFT: case KEY_RSHIFT: return SHIFT.GetValue();
case KEY_LCTRL: case KEY_RCTRL: return CTRL.GetValue();
case KEY_LALT: case KEY_RALT: return ALT.GetValue();
case KEY_INSERT: return INSERT.GetValue();
case KEY_DEL: return DEL.GetValue();
case KEY_PGUP: return PGUP.GetValue();
case KEY_PGDN: return PGDN.GetValue();
case KEY_BACKSLASH: return BACKSLASH.GetValue();
default:
wchar_t c = DeviceButtonToChar( di.button, false );
if( c && c != L' ' ) // Don't show "Key " for space.