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
path: root/doc
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2012-01-22 09:45:56 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-01-22 09:45:56 +0400
commit57d48d4493a78d2886f83a28fe66c2654bed4f6c (patch)
tree205e5116b6f6dd9f6031fb1a858559a240b6abbf /doc
parent4ec5a9a42c00d65898e8a4aef5b73409a5e1785f (diff)
Committing patch "[#29763] Adding an active_events property to SCA_PythonKeyboard and SCA_PythonMouse"
Here is the description: As the summary says, this patch adds a new event to both SCA_PythonKeyboard and SCA_PythonMouse. This property is similar to the events property that both have, but it only returns events which are not KX_NO_INPUTSTATUS. This moves the "no input" check from Python to C, which gave my input handling code a 2x speed up. Python sucks (performance-wise) with iterating lists and SCA_PythonKeyboard has close to 200 events (I think something like 177, but I don't know for sure).
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/rst/bge.types.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/python_api/rst/bge.types.rst b/doc/python_api/rst/bge.types.rst
index bb3ac004d51..6988f90cc1e 100644
--- a/doc/python_api/rst/bge.types.rst
+++ b/doc/python_api/rst/bge.types.rst
@@ -66,6 +66,12 @@ Game Types (bge.types)
:type: dictionary {:ref:`keycode<keyboard-keys>`::ref:`status<input-status>`, ...}
+ .. attribute:: active_events
+
+ A dictionary containing the status of only the active keyboard events or keys. (read-only).
+
+ :type: dictionary {:ref:`keycode<keyboard-keys>`::ref:`status<input-status>`, ...}
+
.. class:: SCA_PythonMouse(PyObjectPlus)
The current mouse.
@@ -75,6 +81,12 @@ Game Types (bge.types)
a dictionary containing the status of each mouse event. (read-only).
:type: dictionary {:ref:`keycode<mouse-keys>`::ref:`status<input-status>`, ...}
+
+ .. attribute:: active_events
+
+ a dictionary containing the status of only the active mouse events. (read-only).
+
+ :type: dictionary {:ref:`keycode<mouse-keys>`::ref:`status<input-status>`, ...}
.. attribute:: position