bevy/crates/bevy_winit/src
Lynn 2bc48254b8
Add delta to CursorMoved event (#11710)
# Objective

- Fixes #11695

## Solution

- Added `delta: Option<Vec2>` to `bevy_window::CursorMoved`. `delta` is
an `Option` because the `CursorMoved` event does get fired when the
cursor was outside the window area in the last frame. In that case there
is no cursor position from the last frame to compare with the current
cursor position.

---

## Changelog

- Added `delta: Option<Vec2>` to `bevy_window::CursorMoved`. 

## Migration Guide

- You need to add `delta` to any manually created `CursorMoved` struct.

---------

Co-authored-by: Kanabenki <lucien.menassol@gmail.com>
Co-authored-by: James Liu <contact@jamessliu.com>
2024-02-12 18:14:22 +00:00
..
accessibility.rs Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
converters.rs Add logical key data to KeyboardInput (#11400) 2024-01-22 15:25:17 +00:00
lib.rs Add delta to CursorMoved event (#11710) 2024-02-12 18:14:22 +00:00
system.rs Avoid unwraps in winit fullscreen handling code (#11735) 2024-02-10 20:17:04 +00:00
winit_config.rs Change WinitPlugin defaults to limit game update rate when window is not visible (for real this time) (#11305) 2024-01-15 17:53:35 +00:00
winit_windows.rs Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00