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 uint

Index of the joystick

button uint

Button to check

Return Value

Type: bool

true if the button is pressed, false otherwise.

Meta