bevy/examples/input
DevinLeamy e94215c4c6 Gamepad events refactor (#6965)
# Objective 

- Remove redundant gamepad events
- Simplify consuming gamepad events.
- Refactor: Separate handling of gamepad events into multiple systems.

## Solution

- Removed `GamepadEventRaw`, and `GamepadEventType`.
- Added bespoke `GamepadConnectionEvent`, `GamepadAxisChangedEvent`, and `GamepadButtonChangedEvent`. 
- Refactored `gamepad_event_system`.
- Added `gamepad_button_event_system`, `gamepad_axis_event_system`, and `gamepad_connection_system`, which update the `Input` and `Axis` resources using their corresponding event type.

Gamepad events are now handled in their own systems and have their own types. 

This allows for querying for gamepad events without having to match on `GamepadEventType` and makes creating handlers for specific gamepad event types, like a `GamepadConnectionEvent` or `GamepadButtonChangedEvent` possible.

We remove `GamepadEventRaw` by filtering the gamepad events, using `GamepadSettings`, _at the source_, in `bevy_gilrs`. This way we can create `GamepadEvent`s directly and avoid creating `GamepadEventRaw` which do not pass the user defined filters. 

We expose ordered `GamepadEvent`s and we can respond to individual gamepad event types.

## Migration Guide

- Replace `GamepadEvent` and `GamepadEventRaw` types with their specific gamepad event type.
2023-01-09 19:24:52 +00:00
..
char_input_events.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
gamepad_input.rs Gamepad type is Copy; do not require / return references to it in Gamepads API (#5296) 2022-09-03 20:08:54 +00:00
gamepad_input_events.rs Gamepad events refactor (#6965) 2023-01-09 19:24:52 +00:00
keyboard_input.rs Miscellaneous code-quality improvements. (#5860) 2022-09-05 00:30:21 +00:00
keyboard_input_events.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
keyboard_modifiers.rs Miscellaneous code-quality improvements. (#5860) 2022-09-05 00:30:21 +00:00
mouse_grab.rs Update wgpu to 0.14.0, naga to 0.10.0, winit to 0.27.4, raw-window-handle to 0.5.0, ndk to 0.7 (#6218) 2022-10-19 17:40:23 +00:00
mouse_input.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
mouse_input_events.rs Miscellaneous code-quality improvements. (#5860) 2022-09-05 00:30:21 +00:00
touch_input.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00
touch_input_events.rs Doc/module style doc blocks for examples (#4438) 2022-05-16 13:53:20 +00:00