Readonlyistrue while button is currently held on padIndex (default 0).
ReadonlywasPressed this poll (false-to-true edge since the previous poll).
ReadonlywasReleased this poll (true-to-false edge since the previous poll).
ReadonlyvalueAnalog value 0..1 for a button (triggers, mostly). Digital buttons read 0 or 1.
ReadonlyaxisPer-axis read, with the configured deadzone applied — values within ±deadzone read as 0.
ReadonlystickStick as a {x, y} vector with radial deadzone (vector length is what's gated).
ReadonlycountCount of slots with connected: true.
Readonlyconnectedtrue when at least one pad is connected.
ReadonlypadsSnapshot of every pad slot. Empty slots show as connected: false stubs.
ReadonlypollSample the platform and advance the edge-detection bookkeeping. Call once per frame. createGame does this for you. No-op after destroy.
ReadonlyonFires the first time a slot transitions disconnected → connected. On the very first poll, any already-connected pad fires immediately — so 'Press A to begin' works without a separate enumeration pass.
ReadonlyonFires when a slot transitions connected → disconnected.
ReadonlydestroyDetach handlers and stop polling. Idempotent.
Normalized gamepad reader.