From 67d6f1914af5aace3084bb943b00b454a55451ab Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 16 Apr 2024 23:00:22 +0200 Subject: feat(engine): add has_moved field to Cursor --- engine/src/input.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/input.rs b/engine/src/input.rs index 78c8270..f64d93e 100644 --- a/engine/src/input.rs +++ b/engine/src/input.rs @@ -53,6 +53,7 @@ impl Keys pub struct Cursor { pub position: Vec2, + pub has_moved: bool, } impl Cursor @@ -106,5 +107,7 @@ fn initialize(keys: Single, cursor: Single, window: Single x: cursor_position.x, y: cursor_position.y, }; + + cursor.has_moved = true; }); } -- cgit v1.2.3-18-g5258