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-04-09 20:00:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-09 20:00:45 +0400
commit4669fa48a82f5f1070cf885cd1714e0a8ff8db3a (patch)
treeb68263e635075298f9585b9ea479a7280e99b66c /source/gameengine/GameLogic/SCA_KeyboardSensor.h
parente14e66f041104c87033ec0b58596fb49c591908c (diff)
Added GameKeys.EventToCharacter(event, is_shift) so you can get the character that would be types when pressing a key.
Last commit was made in the pydocs folder only, so this includes changes mentioned in rev 19620.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_KeyboardSensor.h')
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
index c579b6a82f8..eb26afc96ff 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
@@ -82,22 +82,6 @@ class SCA_KeyboardSensor : public SCA_ISensor
void AddToTargetProp(int keyIndex);
/**
- * Determine whether this character can be printed. We cannot use
- * the library functions here, because we need to test our own
- * keycodes. */
- bool IsPrintable(int keyIndex);
-
- /**
- * Transform keycodes to something printable.
- */
- char ToCharacter(int keyIndex, bool shifted);
-
- /**
- * Tests whether this is a delete key.
- */
- bool IsDelete(int keyIndex);
-
- /**
* Tests whether shift is pressed.
*/
bool IsShifted(void);
@@ -152,7 +136,29 @@ public:
KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,getEventList);
// KeyStatus:
KX_PYMETHOD_DOC_O(SCA_KeyboardSensor,getKeyStatus);
+
+ static PyObject* pyattr_get_events(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
};
+
+/**
+ * Transform keycodes to something printable.
+ */
+char ToCharacter(int keyIndex, bool shifted);
+
+/**
+ * Determine whether this character can be printed. We cannot use
+ * the library functions here, because we need to test our own
+ * keycodes. */
+bool IsPrintable(int keyIndex);
+
+/**
+ * Tests whether this is a delete key.
+ */
+bool IsDelete(int keyIndex);
+
+
#endif //__KX_KEYBOARDSENSOR
+
+