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/PyDoc')
-rw-r--r--source/gameengine/PyDoc/API_intro.py2
-rw-r--r--source/gameengine/PyDoc/GameKeys.py9
-rw-r--r--source/gameengine/PyDoc/GameLogic.py3
-rw-r--r--source/gameengine/PyDoc/GameTypes.py41
4 files changed, 52 insertions, 3 deletions
diff --git a/source/gameengine/PyDoc/API_intro.py b/source/gameengine/PyDoc/API_intro.py
index abc8c83855b..097abbfbf1a 100644
--- a/source/gameengine/PyDoc/API_intro.py
+++ b/source/gameengine/PyDoc/API_intro.py
@@ -26,7 +26,7 @@ The Blender Game Engine Python API Reference
These modules have no GameEngine specific functionality but are useful in many cases.
- - L{Mathutils}
+ - L{mathutils}
- L{Geometry}
- L{BGL}
diff --git a/source/gameengine/PyDoc/GameKeys.py b/source/gameengine/PyDoc/GameKeys.py
index e798f6c901b..8e5c7d3ae24 100644
--- a/source/gameengine/PyDoc/GameKeys.py
+++ b/source/gameengine/PyDoc/GameKeys.py
@@ -150,6 +150,15 @@ Example::
@var SPACEKEY:
@var TABKEY:
+@group Mouse Events: LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE, WHEELUPMOUSE, WHEELDOWNMOUSE, MOUSEX, MOUSEY
+@var LEFTMOUSE:
+@var MIDDLEMOUSE:
+@var RIGHTMOUSE:
+@var WHEELUPMOUSE:
+@var WHEELDOWNMOUSE:
+@var MOUSEX:
+@var MOUSEY:
+
"""
def EventToString(event):
diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py
index 56a9ea0d4f4..4bef65e42b3 100644
--- a/source/gameengine/PyDoc/GameLogic.py
+++ b/source/gameengine/PyDoc/GameLogic.py
@@ -308,6 +308,9 @@ Documentation for the GameLogic Module.
later on with the game load/save actuators.
note: only python built in types such as int/string/bool/float/tuples/lists
can be saved, GameObjects, Actuators etc will not work as expectred.
+
+@var keyboard: The current keyboard wrapped in an SCA_PythonKeyboard object.
+@var mouse: The current mouse wrapped in an SCA_PythonMouse object.
"""
import GameTypes
diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py
index 7045e6cb88e..45d08d2e96a 100644
--- a/source/gameengine/PyDoc/GameTypes.py
+++ b/source/gameengine/PyDoc/GameTypes.py
@@ -108,6 +108,43 @@ class SCA_ILogicBrick(CValue):
"""
#}
+class SCA_PythonKeyboard(PyObjectPlus)
+ """
+ The current keyboard.
+ @ivar events: a list of pressed keys that have either been pressed, or just released, or are active this frame. (read-only).
+
+ - 'keycode' matches the values in L{GameKeys}.
+ - 'status' uses...
+ - L{GameLogic.KX_INPUT_NONE}
+ - L{GameLogic.KX_INPUT_JUST_ACTIVATED}
+ - L{GameLogic.KX_INPUT_ACTIVE}
+ - L{GameLogic.KX_INPUT_JUST_RELEASED}
+
+ @type events: list [[keycode, status], ...]
+ """
+ pass
+
+class SCA_PythonMouse(PyObjectPlus)
+ """
+ The current mouse.
+
+ @ivar events: a list of pressed buttons that have either been pressed, or just released, or are active this frame. (read-only).
+
+ - 'keycode' matches the values in L{GameKeys}.
+ - 'status' uses...
+ - L{GameLogic.KX_INPUT_NONE}
+ - L{GameLogic.KX_INPUT_JUST_ACTIVATED}
+ - L{GameLogic.KX_INPUT_ACTIVE}
+ - L{GameLogic.KX_INPUT_JUST_RELEASED}
+
+ @type events: list [[keycode, status], ...]
+ @ivar position: The normalized x and y position of the mouse cursor.
+ @type position: list [x, y]
+ @ivar visible: The visibility of the mouse cursor
+ @type visible: boolean
+ """
+ pass
+
class SCA_IObject(CValue):
"""
This class has no python functions
@@ -1670,7 +1707,7 @@ class KX_GameObject(SCA_IObject):
@deprecated: use L{localOrientation}
@type orn: 3x3 rotation matrix, or Quaternion.
@param orn: a rotation matrix specifying the new rotation.
- @note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed.
+ @note: When using this matrix with Blender.mathutils.Matrix() types, it will need to be transposed.
"""
def alignAxisToVect(vect, axis, factor):
"""
@@ -1704,7 +1741,7 @@ class KX_GameObject(SCA_IObject):
@deprecated: use L{worldOrientation}
@rtype: 3x3 rotation matrix
@return: The game object's rotation matrix
- @note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed.
+ @note: When using this matrix with Blender.mathutils.Matrix() types, it will need to be transposed.
"""
def applyMovement(movement, local = 0):
"""