wxJoystickEvent(3)
π wxJoystickEvent π
okay bestie, welcome to the wxJoystickEvent page β it's an Erlang module definition, and it's literally all about joystick events. You know, the stuff that happens when someone wiggles a stick or mashes a button and a window goes "oh!! heard!!" πΉοΈβ¨
π DESCRIPTION π
This class is derived, and can use functions, from:
wxEvent
wxWidgets docs: wxJoystickEvent
Events
Use wxEvtHandler:connect/3 with wxJoystickEventType to subscribe to events of this type. That's your ticket in, no cap. ποΈ
β¨ DATA TYPES β¨
wxJoystick() :: #wxJoystick{}.wxJoystickEvent() :: wx:wx_object().wxJoystickEventType() :: joy_button_down | joy_button_up | joy_move | joy_zmove.
four whole event flavours, and every single one of them slays π¦
πΈ FUNCTIONS πΈ
buttonDown(This, [Option]) -> boolean()
buttonDown(This, [Option]) -> boolean()
when
This :: wxJoystickEvent(),
Option :: {but, integer()}.
Returns true if the event was a down event from the specified button (or any button). any button, we're not picky π
buttonIsDown(This, [Option]) -> boolean()
buttonIsDown(This, [Option]) -> boolean()
when
This :: wxJoystickEvent(),
Option :: {but, integer()}.
Returns true if the specified button (or any button) was in a down state.
buttonUp(This, [Option]) -> boolean()
buttonUp(This, [Option]) -> boolean()
when
This :: wxJoystickEvent(),
Option :: {but, integer()}.
Returns true if the event was an up event from the specified button (or any button). the lil release moment π«Ά
getButtonChange(This) -> integer()
getButtonChange(This) -> integer() when This :: wxJoystickEvent().
Returns the identifier of the button changing state.
The return value is where n is the index of the button changing state, which can also be retrieved using GetButtonOrdinal() (not implemented in wx).
β οΈ heads up bestie: for n equal to1,2,3or4there are predefinedwxJOY_BUTTONnconstants which can be used for more clarity, however these constants are not defined for the buttons beyond the first four. so likeβ¦ button five is on its own fr fr π
getButtonState(This) -> integer()
getButtonState(This) -> integer() when This :: wxJoystickEvent().
Returns the down state of the buttons.
This is a wxJOY_BUTTONn identifier, where n is one of 1, 2, 3, 4.
getJoystick(This) -> integer()
getJoystick(This) -> integer() when This :: wxJoystickEvent().
Returns the identifier of the joystick generating the event β one of wxJOYSTICK1 and wxJOYSTICK2. which one of the two little guys did it π
getPosition(This) -> {X :: integer(), Y :: integer()}
getPosition(This) -> {X :: integer(), Y :: integer()}
when This :: wxJoystickEvent().
Returns the x, y position of the joystick event.
These coordinates are valid for all the events except wxEVT_JOY_ZMOVE. so if it's a z-move, don't come looking here for your x/y, it's not giving map coordinates πΊοΈπ
getZPosition(This) -> integer()
getZPosition(This) -> integer() when This :: wxJoystickEvent().
Returns the z position of the joystick event.
This method can only be used for wxEVT_JOY_ZMOVE events. exclusive behaviour, main character energy only π₯
isButton(This) -> boolean()
isButton(This) -> boolean() when This :: wxJoystickEvent().
Returns true if this was a button up or down event (not 'is any button down?'). read the question carefully bestie, it's asking about the event type, not the button's feelings π
isMove(This) -> boolean()
isMove(This) -> boolean() when This :: wxJoystickEvent().
Returns true if this was an x, y move event. β¨
isZMove(This) -> boolean()
isZMove(This) -> boolean() when This :: wxJoystickEvent().
Returns true if this was a z move event. π¦
and that's the whole page, periodt π every function, every default, every little constant accounted for, we don't skip and we don't summarise in this house π
this blessed lil page came to you from Ericsson AB, it's wx 2.6 energy, and yeah β we're talking wxJoystickEvent, the third section because we're fancy like that. byeee, go subscribe to some joystick events bestie πβ¨π
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms