Skip to content

Gamepads

1 min read

Import: import system.window;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

Gamepads

The gamepads connected as of one Window.poll, ordered by slot.

public class Gamepads

length

The number of connected gamepads.

public get length(): int

first

The connected gamepad with the lowest slot, or None when none is connected.

public fun first(): Option<Gamepad>

at

The connected gamepad at index, counting from 0 in slot order, or None when index is negative or not less than length.

public fun at(index: int): Option<Gamepad>