bevy/crates/bevy_gilrs/src
Hennadii Chernyshchyk 282ca735ba
Use Name component for gamepad (#16233)
# Objective

Addressing a suggestion I made in Discord: store gamepad name as a
`Name` component.
Advantages: 
- Will be nicely displayed in inspector / editor.
- Easier to spawn in tests, just `world.spawn(Gamepad::default())`.

## Solution

`Gamepad` component now stores only vendor and product IDs and `Name`
stores the gamepad name.
Since `GamepadInfo` is no longer necessary, I removed it and merged its
fields into the connection event.

## Testing

- Run unit tests.

---

## Migration Guide

- `GamepadInfo` no longer exists:
  -  Name now accesible via `Name` component.
  -  Other information available on `Gamepad` component directly.
  - `GamepadConnection::Connected` now stores all info fields directly.
2024-11-05 00:30:48 +00:00
..
converter.rs Implement gamepads as entities (#12770) 2024-09-27 20:07:20 +00:00
gilrs_system.rs Use Name component for gamepad (#16233) 2024-11-05 00:30:48 +00:00
lib.rs Implement gamepads as entities (#12770) 2024-09-27 20:07:20 +00:00
rumble.rs Remove thiserror from bevy_gilrs (#15773) 2024-10-09 14:21:25 +00:00