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:
authorCampbell Barton <ideasman42@gmail.com>2009-08-23 10:17:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-23 10:17:59 +0400
commit4a4a3b4989355c699b72a8dc15df09fd47621528 (patch)
treeab9da790f9950f557862b413065a9a9f95e26f6d /source/gameengine/Ketsji/KX_MouseFocusSensor.h
parentf08a4c9719ac3d745dfcbae3acc3ca48c38777ad (diff)
Option for MouseFocus sensor. only used when 'Mouse over any' type is set.
Previously the only way to detect if the mouse moved over a different object was to enable true-level-triggering and have a python script detect the change. When the Pulse option is set, focusing on a different object pulses true. Python attribute is focusSensor.usePulseFocus. This is similar to the collision sensors pulse option where changes in the set of collision objects generates an event too. Found this functionality missing when trying to make a logic demo that used mouse-over with overlapping objects.
Diffstat (limited to 'source/gameengine/Ketsji/KX_MouseFocusSensor.h')
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
index 29d674eb305..e1f8d9246e3 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
@@ -49,11 +49,12 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
public:
- KX_MouseFocusSensor(class SCA_MouseManager* keybdmgr,
+ KX_MouseFocusSensor(class SCA_MouseManager* eventmgr,
int startx,
int starty,
short int mousemode,
int focusmode,
+ bool bTouchPulse,
KX_Scene* kxscene,
KX_KetsjiEngine* kxengine,
SCA_IObject* gameobj,
@@ -110,6 +111,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
/* --------------------------------------------------------------------- */
SCA_IObject* m_hitObject;
+ void* m_hitObject_Last; /* only use for comparison, never access */
private:
/**
@@ -123,6 +125,11 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
bool m_mouse_over_in_previous_frame;
/**
+ * Flags whether changes in hit object should trigger a pulse
+ */
+ bool m_bTouchPulse;
+
+ /**
* Flags whether the previous test evaluated positive.
*/
bool m_positive_event;