Mitchell Stokes
57e0d677c6
Committing patch [ #23489 ] add method getEventStatus() to PythonKeyboard and PythonMouse by Geoff Gollmer (gomer)
...
This patch makes SCA_PythonKeyboard.events and SCA_PythonMouse.events return a dictionary of all inputs (including inactive) instead of a list of active inputs.
Example usage:
import bge
if bge.logic.keyboard.events[bge.events.SPACEBAR] = bge.logic.KX_INPUT_JUST_ACTIVATED:
print("Spacebar pressed!")
A couple of changes to the patch:
* Wrap python stuff in #ifndef DISABLE_PYTHON
* Clear and decref m_event_dict in the destructors
A couple of things not related to the patch:
* Made member variables private
* Removed a commented out (and no longer used) method (SCA_PythonMouse.show())
2010-08-30 00:18:50 +00:00
..
2010-08-10 21:22:26 +00:00
2010-08-03 08:12:55 +00:00
2010-08-10 21:22:26 +00:00
2010-04-18 10:28:37 +00:00
2010-03-06 21:22:09 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-02-12 13:34:04 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-08-16 12:14:09 +00:00
2010-08-16 12:14:09 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-08-16 12:14:09 +00:00
2010-02-12 13:34:04 +00:00
2010-02-12 13:34:04 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-23 22:48:26 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-03-26 07:21:48 +00:00
2010-08-16 12:14:09 +00:00
2010-02-12 13:34:04 +00:00
2010-08-30 00:18:50 +00:00
2010-08-30 00:18:50 +00:00
2010-08-30 00:18:50 +00:00
2010-08-30 00:18:50 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-06-06 01:15:44 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-04-18 10:28:37 +00:00
2010-02-12 13:34:04 +00:00
2010-08-29 20:52:05 +00:00