bevy/examples/input
Aztro 6dcff2bfe8
Mouse input accumulation (#14044)
# Objective

- Add the `AccumulatedMouseMotion` and `AccumulatedMouseScroll`
resources to make it simpler to track mouse motion/scroll changes
- Closes #13915

## Solution

- Created two resources, `AccumulatedMouseMotion` and
`AccumulatedMouseScroll`, and a method that tracks the `MouseMotion` and
`MouseWheel` events and accumulates their deltas every frame.
- Also modified the mouse input example to show how to use the
resources.

## Testing

- Tested the changes by modifying an existing example to use the newly
added resources, and moving/scrolling my trackpad around a ton.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Gino Valente <49806985+MrGVSV@users.noreply.github.com>
2024-07-01 14:27:21 +00:00
..
char_input_events.rs Deprecate ReceivedCharacter (#12868) 2024-04-30 00:49:41 +00:00
gamepad_input.rs Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
gamepad_input_events.rs Fix typos (#9965) 2023-09-29 12:26:41 +00:00
gamepad_rumble.rs Rename Input to ButtonInput (#10859) 2023-12-06 20:32:34 +00:00
keyboard_input.rs Update winit dependency to 0.29 (#10702) 2023-12-21 07:40:47 +00:00
keyboard_input_events.rs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
keyboard_modifiers.rs Update winit dependency to 0.29 (#10702) 2023-12-21 07:40:47 +00:00
mouse_grab.rs Rename Input to ButtonInput (#10859) 2023-12-06 20:32:34 +00:00
mouse_input.rs Mouse input accumulation (#14044) 2024-07-01 14:27:21 +00:00
mouse_input_events.rs rename touchpad to gesture, and add new gestures (#13660) 2024-06-04 12:44:25 +00:00
text_input.rs Updates default Text font size to 24px (#13603) 2024-05-31 16:41:27 +00:00
touch_input.rs Non-breaking change* from UK spellings to US (#8291) 2023-04-08 16:22:46 +00:00
touch_input_events.rs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00