Mark keypad buttons as such in the input mapping screen
Both the slash key and the numpad slash key were displayed as 'Key /', so it's not obvious to the user which key actually has been bound. Let's display them as 'Key /' and 'KP /' instead. Same for other KP keys.
This commit is contained in:
@@ -128,6 +128,9 @@ RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
|
|||||||
|
|
||||||
if( di.device == DEVICE_KEYBOARD )
|
if( di.device == DEVICE_KEYBOARD )
|
||||||
{
|
{
|
||||||
|
if( di.button >= KEY_KP_C0 && di.button <= KEY_KP_ENTER )
|
||||||
|
return DeviceButtonToString( di.button );
|
||||||
|
|
||||||
wchar_t c = DeviceButtonToChar( di.button, false );
|
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) );
|
return InputDeviceToString( di.device ) + " " + Capitalize( WStringToRString(wstring()+c) );
|
||||||
|
|||||||
Reference in New Issue
Block a user