joystick update
[blender.git] / source / gameengine / GameLogic / SCA_JoystickSensor.h
index 8b74f6e0296c73687a46cc183654a21c9964bad8..d316ad1119c33805b2c6477fe0a893dc8c3d3fd9 100644 (file)
@@ -73,7 +73,7 @@ class SCA_JoystickSensor :public SCA_ISensor
         * Otherwise it will trigger all the time
         * this is used to see if the trigger state changes.
         */
-       bool    m_istrig_lastjs;
+       bool    m_istrig_prev;
        /**
         * The mode to determine axis,button or hat
         */
@@ -83,6 +83,11 @@ class SCA_JoystickSensor :public SCA_ISensor
         */
        short int m_joyindex;
 
+       /**
+        * Detect all events for the currently selected type
+        */
+       bool m_bAllEvents;
+
        enum KX_JOYSENSORMODE {
                KX_JOYSENSORMODE_NODEF = 0,
                KX_JOYSENSORMODE_AXIS,
@@ -98,8 +103,8 @@ public:
                                           short int joyindex,
                                           short int joymode,
                                           int axis, int axisf,int prec,
-                                          int button, int buttonf,
-                                          int hat, int hatf,
+                                          int button,
+                                          int hat, int hatf, bool allevents,
                                           PyTypeObject* T=&Type );
        virtual ~SCA_JoystickSensor();
        virtual CValue* GetReplica();
@@ -124,12 +129,13 @@ public:
        /* Axes*/
        KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetAxis);
        KX_PYMETHOD_DOC_VARARGS(SCA_JoystickSensor,SetAxis);
-       KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetRealAxis);
+       KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetAxisValue);
        KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetThreshold);
        KX_PYMETHOD_DOC_VARARGS(SCA_JoystickSensor,SetThreshold);
        /* Buttons */
        KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetButton);
-       KX_PYMETHOD_DOC_VARARGS(SCA_JoystickSensor,SetButton);
+       KX_PYMETHOD_DOC_O(SCA_JoystickSensor,SetButton);
+       KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetButtonValue);
        /* Hats */
        KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetHat);
        KX_PYMETHOD_DOC_VARARGS(SCA_JoystickSensor,SetHat);