Joystick.isButtonPressed

Check if a joystick button is pressed. * If the joystick is not connected, this function returns false. *

class Joystick
static
bool
isButtonPressed
(
,
uint button
)

Parameters

joystick
Type: uint

Index of the joystick

button
Type: uint

Button to check *

Return Value

Type: bool

true if the button is pressed, false otherwise.

Meta