menu
InputGamepadBinding
import { InputGamepadBinding } from "destack:input/binding";
Gamepad binding family.
1export interface InputGamepadBinding {2 readGamepadState(device: InputDeviceHandle): Result<GamepadState, HostError>;3 setGamepadPlayerIndex(device: InputDeviceHandle, playerIndex: uint8): Result<void, HostError>;4 setGamepadLight(device: InputDeviceHandle, red: uint8, green: uint8, blue: uint8): Result<void, HostError>;5 setGamepadMotion(device: InputDeviceHandle, isEnabled: boolean): Result<void, HostError>;6 setGamepadMotionRate(device: InputDeviceHandle, sampleRateHz: float64): Result<void, HostError>;7}Members
readGamepadState(device: InputDeviceHandle): Result<GamepadState, HostError>Read one gamepad state snapshot.
setGamepadPlayerIndex(device: InputDeviceHandle, playerIndex: uint8): Result<void, HostError>Set one gamepad player index.
setGamepadLight(device: InputDeviceHandle, red: uint8, green: uint8, blue: uint8): Result<void, HostError>Set one gamepad light color.
setGamepadMotion(device: InputDeviceHandle, isEnabled: boolean): Result<void, HostError>Enable or disable gamepad motion sensors.
setGamepadMotionRate(device: InputDeviceHandle, sampleRateHz: float64): Result<void, HostError>Set the gamepad motion sensor sample rate.