cohtml::GamepadState
Represents the entire state of a single gamepad.
#include <System.h>
Inherited by cohtml::GamepadStateExtended
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| unsigned | Id The unique identifier of an already registered gamepad. |
| float | Timestamp A timestamp that marks when was the last time this gamepad was updated. This value is passed directly to JS, we won’t use it in any other way so you can also store arbitrary information here. |
| float * | ButtonValues An array of values between 0 and 1 showing how much each button is pressed. Its length must be equal to the number of buttons passed to RegisterGamepad. |
| float * | AxisValues An array of values between -1 and 1 showing the position of each axis. Its length must be equal to the number of axes passed to RegisterGamepad. |
Public Attributes Documentation
Section titled “Public Attributes Documentation”variable Id
Section titled “variable Id”unsigned Id;The unique identifier of an already registered gamepad.
variable Timestamp
Section titled “variable Timestamp”float Timestamp;A timestamp that marks when was the last time this gamepad was updated. This value is passed directly to JS, we won’t use it in any other way so you can also store arbitrary information here.
variable ButtonValues
Section titled “variable ButtonValues”float * ButtonValues;An array of values between 0 and 1 showing how much each button is pressed. Its length must be equal to the number of buttons passed to RegisterGamepad.
variable AxisValues
Section titled “variable AxisValues”float * AxisValues;An array of values between -1 and 1 showing the position of each axis. Its length must be equal to the number of axes passed to RegisterGamepad.
© 2026 Coherent Labs. All rights reserved.