Input event changes

- New InputEventManager class.  It will be used by 3rd party input
devices to generate Torque 3D input events.
- Expanded the input event signal to include three new floats and a new
integer.
- Expanded the number of joystick buttons to 48.
- The input virtual map is now extendable rather than hard coded.
- The input devices types are now extendable rather than hard coded.
- New SI_POS, SI_ROT, SI_INT, and SI_FLOAT input event types.
- New SI_VALUE input action type.
- ActionMap has been updated to work with these changes.
- Removed unnecessary references to platform/event.h
This commit is contained in:
DavidWyand-GG 2013-01-22 18:17:41 -05:00
parent 5d6751cdd4
commit 539efcb1e1
43 changed files with 923 additions and 316 deletions

View file

@ -21,7 +21,6 @@
//-----------------------------------------------------------------------------
#include "platform/platform.h"
#include "platform/event.h"
#include "windowManager/platformWindowMgr.h"
#include "gfx/gfxInit.h"
#include "gfx/gfxDevice.h"

View file

@ -31,7 +31,6 @@
#include <windows.h>
#include "platform/event.h"
#include "platform/platformInput.h"
#include "windowManager/win32/winDispatch.h"
#include "windowManager/win32/win32Window.h"

View file

@ -310,7 +310,7 @@ void WindowInputGenerator::handleKeyboard( WindowId did, U32 modifier, U32 actio
//-----------------------------------------------------------------------------
// Raw input
//-----------------------------------------------------------------------------
void WindowInputGenerator::handleInputEvent( U32 deviceInst,F32 fValue, U16 deviceType, U16 objType, U16 ascii, U16 objInst, U8 action, U8 modifier )
void WindowInputGenerator::handleInputEvent( U32 deviceInst, F32 fValue, F32 fValue2, F32 fValue3, F32 fValue4, S32 iValue, U16 deviceType, U16 objType, U16 ascii, U16 objInst, U8 action, U8 modifier )
{
// Skip it if we don't have focus.
if(!mInputController || !mFocused)
@ -320,6 +320,10 @@ void WindowInputGenerator::handleInputEvent( U32 deviceInst,F32 fValue, U16 devi
InputEventInfo event;
event.deviceInst = deviceInst;
event.fValue = fValue;
event.fValue2 = fValue2;
event.fValue3 = fValue3;
event.fValue4 = fValue4;
event.iValue = iValue;
event.deviceType = (InputDeviceTypes)deviceType;
event.objType = (InputEventType)objType;
event.ascii = ascii;

View file

@ -58,7 +58,7 @@ class WindowInputGenerator
void handleKeyboard (WindowId did, U32 modifier, U32 action, U16 key);
void handleCharInput (WindowId did, U32 modifier, U16 key);
void handleAppEvent (WindowId did, S32 event);
void handleInputEvent (U32 deviceInst,F32 fValue, U16 deviceType, U16 objType, U16 ascii, U16 objInst, U8 action, U8 modifier);
void handleInputEvent (U32 deviceInst, F32 fValue, F32 fValue2, F32 fValue3, F32 fValue4, S32 iValue, U16 deviceType, U16 objType, U16 ascii, U16 objInst, U8 action, U8 modifier);
void generateInputEvent( InputEventInfo &inputEvent );