The name property allows for an easy way to identify a button when it may be one of many buttons available.
This event is fired every time the button remains being pressed, but changes how hard it's being pressed.
This event is fired every time the button switches state from not being pressed, to being pressed.
This event is fired every time the button switches state from being pressed, to not being pressed.
Tracks changes to the button's state.
Returns how many consecutive milliseconds the button has been held pressed for. If the button is not currently pressed, this will return 0.
Returns whether the button is currently pressed.
The name property allows for an easy way to identify a button when it may be one of many buttons available.
Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.
Returns the current value of the button.
Generated using TypeDoc
The ButtonInput class models a button which can be pressed or released. Pressure-sensitive buttons are also supported, with changes in pressure announced through the
changed
ButtonEvent.