pub struct PointerEvent {
pub viewport_pos: Point,
pub wheel_delta: Vec2,
pub button: PointerButton,
pub buttons: PointerButtons,
pub mods: Modifiers,
pub count: u8,
pub did_focus_window: bool,
pub pressure: f32,
pub tangential_pressure: f32,
pub tilt: Vec2,
pub twist: f32,
pub pointer_type: PointerType,
}Expand description
Information about a pointer event.
Fields§
§viewport_pos: PointThe position of the pointer event in the viewport.
wheel_delta: Vec2The scroll amount.
The button responsible for a pointer event.
This will always be PointerButton::None for an On::PointerMove event.
Pointer buttons being held down during a move or after a click event.
It will contain the button that caused an On::PointerDown event,
but it will not contain the button that caused an On::PointerUp event.
mods: ModifiersKeyboard modifier keys pressed at the time of the event.
count: u8The number of clicks associated with this event.
This will always be 0 for On::PointerUp and On::PointerMove events.
did_focus_window: boolThis is set to true if the pointer event caused the window to gain focus.
pressure: f32The normalized pressure of the pointer input in the range 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.
tangential_pressure: f32The normalized tangential pressure of the pointer input in the range -1 to 1, where 0 is the neutral position of the control.
tilt: Vec2The tilt of the pen in the X and Y axis, from -1 to 1.
twist: f32The clockwise rotation of the pen stylus around its major axis in degrees, with a value in the range 0 to 359.
pointer_type: PointerTypeIndicates the device type that caused the event.
Trait Implementations§
Source§impl Clone for PointerEvent
impl Clone for PointerEvent
Source§fn clone(&self) -> PointerEvent
fn clone(&self) -> PointerEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more