Gamepad
You can get a handle to the gamepad input state with gamepad::input(). With
this, you can get an iterator of the connected gamepads and their IDs with gamepad::input().gamepads().
Using a Gamepad, which can also be obtained from
gamepad::input().gamepad(id), you can query the state of the buttons and
sticks using the methods on the Gamepad struct.
Importantly:
.right_stick,.left_stick, and.d_padfor getting the input of sticks/dpad as a vector..is_pressedfor checking if agamepad::Buttonis pressed
See: gamepad module
See also:
/examples/gamepad.rs
for an example on how to use the API, and to test if your controller is being
recognised properly.