Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GameLogic/SCA_JoystickSensor.h')
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.h b/source/gameengine/GameLogic/SCA_JoystickSensor.h
index 8b74f6e0296..d316ad1119c 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.h
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.h
@@ -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);