classafGamepad::Gamepad
sys::Obj afGamepad::Gamepad
Represents a Gamepad controller. Use listHidDevices() to obtain an instance.
Float buttonThreshold := 0.6f
A number between 0 - 1, over which a button value is considered to be pressed. Used to created
buttonUp
andbuttonDown
event data.- listGamepads
static Gamepad[] listGamepads()
Lists all supported Gamepad controllers.
- listHidDevices
static Gamepad[] listHidDevices()
Lists all USB-HID devices. Some may be Gamepad controllers, some may not be.
- manufacturer
const Str? manufacturer
Name of the manufacturer.
- onDisconnect
|Gamepad? onDisconnect
Listener that's called when the Gamepad is disconnected / unplugged.
- onInput
|GamepadEvent? onInput
Listener that's called when the Gamepad input changes.
- path
const Str path
A platform dependent path that describes the
physical
path through hubs and ports to the device.- prodcutDesc
const Str? prodcutDesc
Product description.
- productId
const Int productId
The 16 bit product ID.
- vendorId
const Int vendorId
The 16 bit vendor ID.