summaryrefslogtreecommitdiff
path: root/engine/src/windowing/mouse.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-04-05 18:12:51 +0200
committerHampusM <hampus@hampusmat.com>2026-04-05 18:12:51 +0200
commitd193aa46ec80a58a6a6ad619c38619e434a6137a (patch)
tree4472759e319e9aa8d9a296dd030a14e4922b6ab0 /engine/src/windowing/mouse.rs
parent812d574082b951a6b60db5f61373bb5a87a01cbe (diff)
feat(engine): add position to mouse component
Diffstat (limited to 'engine/src/windowing/mouse.rs')
-rw-r--r--engine/src/windowing/mouse.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/engine/src/windowing/mouse.rs b/engine/src/windowing/mouse.rs
index 1afe594..3b08443 100644
--- a/engine/src/windowing/mouse.rs
+++ b/engine/src/windowing/mouse.rs
@@ -6,9 +6,17 @@ use crate::vector::Vec2;
#[derive(Debug, Default, Clone, Sole)]
#[non_exhaustive]
-pub struct Motion
+pub struct Mouse
{
- pub position_delta: Vec2<f64>,
+ /// Change in coordinates this tick. Unit is unspecified and platforms may use
+ /// different units. Updated automatically by the [`windowing extension`].
+ ///
+ /// [`windowing extension`]: crate::windowing
+ pub curr_tick_position_delta: Vec2<f64>,
+
+ /// Coordinates in pixels relative to the top-left corner of the window. May have
+ /// been affected by cursor acceleration
+ pub position: Vec2<f64>,
}
/// Mouse buttons.