JoyButtonEvent.fromSdlEvent constructor

JoyButtonEvent.fromSdlEvent(
  1. Sdl sdl,
  2. SDL_JoyButtonEvent e
)

Create an instance from an event.

Implementation

JoyButtonEvent.fromSdlEvent(final Sdl sdl, final SDL_JoyButtonEvent e)
    : button = e.button,
      state = e.state.toPressedState(),
      super(joystickId: e.which, sdl: sdl, timestamp: e.timestamp);