working on mouse stuff, one part at a time.

This commit is contained in:
AJ Kelly
2011-02-14 13:41:44 -06:00
parent 24a15bae96
commit c9c61c4bb9
2 changed files with 4 additions and 8 deletions
+1 -3
View File
@@ -127,7 +127,6 @@ static void InitNames()
g_mapNamesToString[JOY_AUX_3] = "Aux3"; g_mapNamesToString[JOY_AUX_3] = "Aux3";
g_mapNamesToString[JOY_AUX_4] = "Aux4"; g_mapNamesToString[JOY_AUX_4] = "Aux4";
/*
g_mapNamesToString[MOUSE_LEFT] = "left mouse button"; g_mapNamesToString[MOUSE_LEFT] = "left mouse button";
g_mapNamesToString[MOUSE_RIGHT] = "right mouse button"; g_mapNamesToString[MOUSE_RIGHT] = "right mouse button";
g_mapNamesToString[MOUSE_MIDDLE] = "middle mouse button"; g_mapNamesToString[MOUSE_MIDDLE] = "middle mouse button";
@@ -135,7 +134,6 @@ static void InitNames()
g_mapNamesToString[MOUSE_BACK] = "back mouse button"; g_mapNamesToString[MOUSE_BACK] = "back mouse button";
g_mapNamesToString[MOUSE_WHEELUP] = "mousewheel up"; g_mapNamesToString[MOUSE_WHEELUP] = "mousewheel up";
g_mapNamesToString[MOUSE_WHEELDOWN] = "mousewheel down"; g_mapNamesToString[MOUSE_WHEELDOWN] = "mousewheel down";
*/
FOREACHM( DeviceButton, RString, g_mapNamesToString, m ) FOREACHM( DeviceButton, RString, g_mapNamesToString, m )
g_mapStringToNames[m->second] = m->first; g_mapStringToNames[m->second] = m->first;
@@ -229,7 +227,7 @@ static const char *InputDeviceNames[] = {
"Pump1", "Pump1",
"Pump2", "Pump2",
"Midi", "Midi",
//"Mouse", "Mouse",
}; };
XToString( InputDevice ); XToString( InputDevice );
StringToX( InputDevice ); StringToX( InputDevice );
+3 -5
View File
@@ -46,7 +46,7 @@ enum InputDevice
DEVICE_PUMP1, DEVICE_PUMP1,
DEVICE_PUMP2, DEVICE_PUMP2,
DEVICE_MIDI, DEVICE_MIDI,
//DEVICE_MOUSE, DEVICE_MOUSE,
NUM_InputDevice, // leave this at the end NUM_InputDevice, // leave this at the end
InputDevice_Invalid // means this is NULL InputDevice_Invalid // means this is NULL
}; };
@@ -55,7 +55,7 @@ const RString& InputDeviceToString( InputDevice i );
InputDevice StringToInputDevice( const RString& s ); InputDevice StringToInputDevice( const RString& s );
inline bool IsJoystick( InputDevice id ) { return DEVICE_JOY1 <= id && id < DEVICE_JOY1+NUM_JOYSTICKS; } inline bool IsJoystick( InputDevice id ) { return DEVICE_JOY1 <= id && id < DEVICE_JOY1+NUM_JOYSTICKS; }
inline bool IsPump( InputDevice id ) { return DEVICE_PUMP1 <= id && id < DEVICE_PUMP1+NUM_PUMPS; } inline bool IsPump( InputDevice id ) { return DEVICE_PUMP1 <= id && id < DEVICE_PUMP1+NUM_PUMPS; }
//inline bool IsMouse( InputDevice id ) { return id == DEVICE_MOUSE; } inline bool IsMouse( InputDevice id ) { return id == DEVICE_MOUSE; }
struct InputDeviceInfo struct InputDeviceInfo
{ {
@@ -290,7 +290,6 @@ enum DeviceButton
MIDI_LAST = 699, MIDI_LAST = 699,
// Mouse: // Mouse:
/*
MOUSE_LEFT = 700, MOUSE_LEFT = 700,
MOUSE_RIGHT, MOUSE_RIGHT,
MOUSE_MIDDLE, MOUSE_MIDDLE,
@@ -298,7 +297,6 @@ enum DeviceButton
MOUSE_WHEELUP, MOUSE_WHEELDOWN, MOUSE_WHEELUP, MOUSE_WHEELDOWN,
// for mice with forward and backwards buttons // for mice with forward and backwards buttons
MOUSE_FORWARD, MOUSE_BACK, MOUSE_FORWARD, MOUSE_BACK,
*/
NUM_DeviceButton, NUM_DeviceButton,
DeviceButton_Invalid DeviceButton_Invalid
@@ -354,7 +352,7 @@ public:
void MakeInvalid() { device = InputDevice_Invalid; }; void MakeInvalid() { device = InputDevice_Invalid; };
bool IsJoystick() const { return ::IsJoystick(device); } bool IsJoystick() const { return ::IsJoystick(device); }
//bool IsMouse() const { return ::IsMouse(device); } bool IsMouse() const { return ::IsMouse(device); }
}; };
typedef vector<DeviceInput> DeviceInputList; typedef vector<DeviceInput> DeviceInputList;