bevy/crates/bevy_input/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
..
axis.rs Gamepad improvements (#16222) 2024-11-04 17:05:24 +00:00
button_input.rs Fix window spawning triggering ButtonInput<KeyCode>::just_pressed/just_released (#12372) 2024-09-30 18:24:36 +00:00
common_conditions.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
gamepad.rs Use Name component for gamepad (#16233) 2024-11-05 00:30:48 +00:00
gestures.rs bevy_input: allow use without bevy_reflect (#14167) 2024-07-08 01:09:07 +00:00
keyboard.rs Use en-us locale for typos (#16037) 2024-10-20 18:55:17 +00:00
lib.rs Use Name component for gamepad (#16233) 2024-11-05 00:30:48 +00:00
mouse.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
touch.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00