GamepadButton

value class GamepadButton(val index: Int)(source)

A gamepad button in SDL's standard layout, named by position rather than by label: SOUTH is the bottom face button, A on an Xbox pad and cross on a PlayStation pad.

Every button EventPump reports has an index below COUNT, so button state can live in a flat array indexed by index. Indices without a constant here are extra buttons some pads have, such as paddles, a touchpad press or a share button.

Constructors

Link copied to clipboard
constructor(index: Int)

Types

Link copied to clipboard
object Companion

Holds the buttons a gamepad reports.

Properties

Link copied to clipboard
val index: Int

Functions

Link copied to clipboard
open override fun toString(): String