getButton method

bool getButton(
  1. int button
)

Get the current state of a button.

Returns true if the button is currently pressed, false otherwise.

SDL Docs

Implementation

bool getButton(final int button) =>
    sdl.getBool(sdl.sdl.SDL_JoystickGetButton(handle, button));