Module gamepad

Source
Expand description

The gamepad input functionality.

Structs§

AxisSettings
Settings for a GamepadAxis.
ButtonAxisSettings
Settings for a GamepadButton.
ButtonSettings
Manages settings for gamepad buttons.
Gamepad
Stores a connected gamepad’s metadata such as the name and its GamepadButton and GamepadAxis.
GamepadAxisChangedEvent
GamepadAxis event triggered by an analog state change
GamepadButtonChangedEvent
GamepadButton event triggered by an analog state change
GamepadButtonStateChangedEvent
GamepadButton event triggered by a digital state change
GamepadConnectionEvent
A Gamepad connection event. Created when a connection to a gamepad is established and when a gamepad is disconnected.
GamepadRumbleIntensity
The intensity at which a gamepad’s force-feedback motors may rumble.
GamepadSettings
Gamepad settings component.
RawGamepadAxisChangedEvent
GamepadAxis changed event unfiltered by GamepadSettings
RawGamepadButtonChangedEvent
GamepadButton changed event unfiltered by GamepadSettings

Enums§

AxisSettingsError
Errors that occur when setting axis settings for gamepad input.
ButtonSettingsError
Errors that occur when setting button settings for gamepad input.
GamepadAxis
Represents gamepad input types that are mapped in the range [-1.0, 1.0]
GamepadButton
Represents gamepad input types that are mapped in the range [0.0, 1.0].
GamepadConnection
The connection status of a gamepad.
GamepadEvent
A gamepad event.
GamepadInput
Encapsulation over GamepadAxis and GamepadButton
GamepadRumbleRequest
An event that controls force-feedback rumbling of a Gamepad entity.
RawGamepadEvent
A raw gamepad event.

Functions§

gamepad_connection_system
Handles GamepadConnectionEvents events.
gamepad_event_processing_system
Consumes RawGamepadEvent events, filters them using their GamepadSettings and if successful, updates the Gamepad and sends GamepadAxisChangedEvent, GamepadButtonStateChangedEvent, GamepadButtonChangedEvent events.