diff options
author | HampusM <hampus@hampusmat.com> | 2024-04-16 23:00:22 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-04-16 23:00:22 +0200 |
commit | 67d6f1914af5aace3084bb943b00b454a55451ab (patch) | |
tree | 3bb77b336c0668bd515031c61c92d5d8ed87a4d3 /engine/src/input.rs | |
parent | 2923491791cb93815e920495103f11faaeb25f04 (diff) |
feat(engine): add has_moved field to Cursor
Diffstat (limited to 'engine/src/input.rs')
-rw-r--r-- | engine/src/input.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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<f64>, + pub has_moved: bool, } impl Cursor @@ -106,5 +107,7 @@ fn initialize(keys: Single<Keys>, cursor: Single<Cursor>, window: Single<Window> x: cursor_position.x, y: cursor_position.y, }; + + cursor.has_moved = true; }); } |