[RageInput] Added "No input devices were loaded." string to languages.

[RageInputDevice] Added localized names for InputDeviceState.
This commit is contained in:
AJ Kelly
2011-08-18 19:19:03 -05:00
parent 57d5a3a0b3
commit 66a11ed08f
4 changed files with 23 additions and 5 deletions
+5
View File
@@ -8,6 +8,11 @@ ________________________________________________________________________________
StepMania 5.0 Preview 3 | 2011081?
--------------------------------------------------------------------------------
2011/08/18
----------
* [RageInput] Added "No input devices were loaded." string to languages. [AJ]
* [RageInputDevice] Added localized names for InputDeviceState. [AJ]
2011/08/16
----------
* Added PrettyPercent(numerator,denominator) Lua binding. [AJ]
+9
View File
@@ -1168,6 +1168,15 @@ Voltage=Voltage
MinMidiNote=MinMidiNote
MaxMidiNote=MaxMidiNote
[RageInput]
No input devices were loaded.=No input devices were loaded.
[RageInputDevice]
Connected=Connected
Unplugged=Unplugged
NeedsMultitap=Needs a Multitap
NoInputHandler=No Input Handler
[RageSoundManager]
Couldn't find a sound driver that works=Couldn't find a sound driver that works
+3 -1
View File
@@ -5,6 +5,7 @@
#include "Foreach.h"
#include "Preference.h"
#include "LuaManager.h"
#include "LocalizedString.h"
RageInput* INPUTMAN = NULL; // globally accessable input device
@@ -48,6 +49,7 @@ RageInput::~RageInput()
LUA->UnsetGlobal( "INPUTMAN" );
}
static LocalizedString NO_INPUT_DEVICES_LOADED ( "RageInput", "No input devices were loaded." );
void RageInput::LoadDrivers()
{
for( unsigned i = 0; i < m_InputHandlers.size(); ++i )
@@ -64,7 +66,7 @@ void RageInput::LoadDrivers()
// If no input devices are loaded, the user won't be able to input anything.
if( apDevices.size() == 0 )
LOG->Warn( "No input devices were loaded." );
LOG->Warn( NO_INPUT_DEVICES_LOADED );
}
void RageInput::Update()
+6 -4
View File
@@ -5,6 +5,9 @@
#include "RageInputDevice.h"
#include "RageUtil.h"
#include "Foreach.h"
#include "LocalizedString.h"
//static LocalizedString D3D_NOT_INSTALLED ( "RageDisplay_D3D", "DirectX 8.1 or greater is not installed. You can download it from:" );
static const char *InputDeviceStateNames[] = {
"Connected",
@@ -13,6 +16,7 @@ static const char *InputDeviceStateNames[] = {
"NoInputHandler",
};
XToString( InputDeviceState );
XToLocalizedString( InputDeviceState );
static map<DeviceButton,RString> g_mapNamesToString;
static map<RString,DeviceButton> g_mapStringToNames;
@@ -57,13 +61,11 @@ static void InitNames()
g_mapNamesToString[KEY_RALT] = "right alt";
g_mapNamesToString[KEY_LMETA] = "left meta";
g_mapNamesToString[KEY_RMETA] = "right meta";
// Note: The super key means different things depending on the platform.
// On Windows, it's known as the Windows key. In other operating systems,
// it is the Super key. -aj
// Note: On Windows, the Super key is the Windows key. -aj
g_mapNamesToString[KEY_LSUPER] = "left super";
g_mapNamesToString[KEY_RSUPER] = "right super";
g_mapNamesToString[KEY_MENU] = "menu";
g_mapNamesToString[KEY_FN] = "function";
g_mapNamesToString[KEY_NUMLOCK] = "num lock";