Skip to main content

Module gamepad

Module gamepad 

Source
Expand description

Gamepad/controller polling — GamepadPlugin inserts Gamepads as a resource and ticks it once per frame in PreUpdate, exactly like crate::time::TimePlugin. App::new() already builds this in, so Res<Gamepads> works without registering anything yourself.

Backend-agnostic, same as crate::time — nothing here depends on pebble::wgpu or any particular rendering backend.

Structs§

GamepadId
Identifies one connected gamepad. Opaque, Copy — valid for the whole lifetime of the Gamepads resource that handed it out (via Gamepads::ids), even across a disconnect/reconnect of a different controller.
GamepadPlugin
Registers Gamepads as a resource and advances it once per frame.
Gamepads
Every connected gamepad’s current state. A self-contained resource — Res<Gamepads>/ResMut<Gamepads> — inserted by GamepadPlugin.

Enums§

GamepadAxis
Mirrors gilrs::Axis.
GamepadButton
Mirrors gilrs::Button.