From f60992daae876182800ab2adf8f24fd90a13b240 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 29 Aug 2008 03:15:17 +0000 Subject: BGE Py API - GameKeys.EventToString() utility function, makes key configuration menu's easier to write. own error with blenderplayer, wasnt decreffing the GameLogic module, probably didnt matter since python was restarted anyway, but is incorrect. --- source/gameengine/PyDoc/GameKeys.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/gameengine/PyDoc') diff --git a/source/gameengine/PyDoc/GameKeys.py b/source/gameengine/PyDoc/GameKeys.py index 268fb9cc172..1a0a737718e 100644 --- a/source/gameengine/PyDoc/GameKeys.py +++ b/source/gameengine/PyDoc/GameKeys.py @@ -164,3 +164,12 @@ Example:: # Activate Right! """ + +def EventToString(event): + """ + Return the string name of a key event. Will raise a ValueError error if its invalid. + + @type event: int + @param event: key event from GameKeys or the keyboard sensor. + @rtype: string + """ -- cgit v1.2.3