diff --git a/egui/src/data/input.rs b/egui/src/data/input.rs index b1ffcc26e3b0..cf44af68fc76 100644 --- a/egui/src/data/input.rs +++ b/egui/src/data/input.rs @@ -177,9 +177,12 @@ pub enum Event { /// The mouse or touch moved to a new place. PointerMoved(Pos2), - /// The mouse delta from winit::DeviceEvent. MouseDelta and PointerMoved can be emmited simultaneously. - /// If MouseDelta accumulated value is zero per frame, then `old_pos-new_pos` will be used as fallback. - /// For now it used in situations when we need delta but mouse pointer is on screen edge. + /// Mouse movement in unspecified units. + /// + /// Both [`Self::MouseDelta`] and [`Self::PointerMoved`] can both be emitted for the same movement, + /// but when a pointer is grabbed or at the edge of the screen, only [`Self::MouseDelta`] is emitted. + /// + /// Some integrations do not emit any [`Self::MouseDelta`]. In these cases the change in [`Self::PointerMoved`] will be used for [`PointerState::delta`]. MouseDelta(Vec2), /// A mouse button was pressed or released (or a touch started or stopped).