v2026.11.2
All Bundles
Bundle

SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.

ControllerButtonEvent

Game controller button event

Operations

GetButton #

The controller button

method : public : GetButton() ~ GameControllerButton

Return

TypeDescription
GameControllerButtonthe button, a GameControllerButton value

GetState #

Button state

method : public : GetState() ~ Int

Return

TypeDescription
Int1 when pressed, 0 when released

GetTimestamp #

Timestamp of the event

method : public : GetTimestamp() ~ Int

Return

TypeDescription
Intevent timestamp

GetType #

Event type

method : public : GetType() ~ Int

Return

TypeDescription
IntEventType->SDL_CONTROLLERBUTTONDOWN or EventType->SDL_CONTROLLERBUTTONUP

GetWhich #

The joystick instance id of the controller

method : public : GetWhich() ~ Int

Return

TypeDescription
Intinstance id