localize "space"

This commit is contained in:
Glenn Maynard
2006-06-15 06:16:11 +00:00
parent 3c9897989c
commit 1d4601eca7
@@ -101,24 +101,6 @@ wchar_t InputHandler::DeviceButtonToChar( DeviceButton button, bool bUseCurrentK
return c;
}
RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
{
if( di.device == DEVICE_KEYBOARD )
{
wchar_t c = DeviceButtonToChar( di.button, false );
if( c )
{
if( c == L' ' )
return "space"; // Don't show "Key " for space.
else
return "Key " + WStringToRString(wstring()+c);
}
return DeviceButtonToString( di.button );
}
return di.ToString();
}
static LocalizedString HOME ( "DeviceButton", "Home" );
static LocalizedString END ( "DeviceButton", "End" );
static LocalizedString UP ( "DeviceButton", "Up" );
@@ -133,6 +115,24 @@ static LocalizedString PGUP ( "DeviceButton", "PgUp" );
static LocalizedString PGDN ( "DeviceButton", "PgDn" );
static LocalizedString BACKSLASH ( "DeviceButton", "Backslash" );
RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
{
if( di.device == DEVICE_KEYBOARD )
{
wchar_t c = DeviceButtonToChar( di.button, false );
if( c )
{
if( c == L' ' )
return SPACE.GetValue(); // Don't show "Key " for space.
else
return "Key " + WStringToRString(wstring()+c);
}
return DeviceButtonToString( di.button );
}
return di.ToString();
}
RString InputHandler::GetLocalizedInputString( const DeviceInput &di )
{
switch( di.button )