This event class contains information about joystick events, particularly events received by windows.
Handlers bound for the following event types will receive a JoystickEvent parameter.
See also
__init__ | Constructor. |
ButtonDown | Returns True if the event was a down event from the specified button (or any button). |
ButtonIsDown | Returns True if the specified button (or any button) was in a down state. |
ButtonUp | Returns True if the event was an up event from the specified button (or any button). |
GetButtonChange | Returns the identifier of the button changing state. |
GetButtonState | Returns the down state of the buttons. |
GetJoystick | Returns the identifier of the joystick generating the event - one of JOYSTICK1 and JOYSTICK2. |
GetPosition | Returns the x, y position of the joystick event. |
GetZPosition | Returns the z position of the joystick event. |
IsButton | Returns True if this was a button up or down event (not ‘is any button down?’). |
IsMove | Returns True if this was an x, y move event. |
IsZMove | Returns True if this was a z move event. |
ButtonChange | See GetButtonChange |
ButtonState | See GetButtonState |
Joystick | See GetJoystick |
Position | See GetPosition |
ZPosition | See GetZPosition |
This event class contains information about joystick events, particularly events received by windows.
Possible constructors:
JoystickEvent(eventType=wxEVT_NULL, state=0, joystick=JOYSTICK1,
change=0)
Constructor.
Parameters: |
|
---|
Returns True if the event was a down event from the specified button (or any button).
Parameters: | button (int) – Can be JOY_BUTTONn where n is 1, 2, 3 or 4; or JOY_BUTTON_ANY to indicate any button down event. |
---|---|
Return type: | bool |
Returns True if the specified button (or any button) was in a down state.
Parameters: | button (int) – Can be JOY_BUTTONn where n is 1, 2, 3 or 4; or JOY_BUTTON_ANY to indicate any button down event. |
---|---|
Return type: | bool |
Returns True if the event was an up event from the specified button (or any button).
Parameters: | button (int) – Can be JOY_BUTTONn where n is 1, 2, 3 or 4; or JOY_BUTTON_ANY to indicate any button down event. |
---|---|
Return type: | bool |
Returns the identifier of the button changing state.
This is a JOY_BUTTONn identifier, where n is one of 1, 2, 3, 4.
Return type: | int |
---|
Returns the down state of the buttons.
This is a JOY_BUTTONn identifier, where n is one of 1, 2, 3, 4.
Return type: | int |
---|
Returns the identifier of the joystick generating the event - one of JOYSTICK1 and JOYSTICK2.
Return type: | int |
---|
Returns the x, y position of the joystick event.
These coordinates are valid for all the events except wxEVT_JOY_ZMOVE.
Return type: | Point |
---|
Returns the z position of the joystick event.
This method can only be used for wxEVT_JOY_ZMOVE events.
Return type: | int |
---|
Returns True if this was a button up or down event (not ‘is any button down?’).
Return type: | bool |
---|
Returns True if this was an x, y move event.
Return type: | bool |
---|
Returns True if this was a z move event.
Return type: | bool |
---|
See GetButtonChange
See GetButtonState
See GetJoystick
See GetPosition
See GetZPosition