diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-08-29 07:15:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-08-29 07:15:17 +0400 |
commit | f60992daae876182800ab2adf8f24fd90a13b240 (patch) | |
tree | 7f22c2f257c1a9b388d98b18c780570b08fcfd8f /source/gameengine/PyDoc | |
parent | 272132888f09b9dd4e0b1e519aab5a38380752b2 (diff) |
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.
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r-- | source/gameengine/PyDoc/GameKeys.py | 9 |
1 files changed, 9 insertions, 0 deletions
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 + """ |