Struct rich_sdl2_rust::event::mouse::MouseWheelEvent
source · pub struct MouseWheelEvent {
pub timestamp: u32,
pub window_id: u32,
pub mouse_id: u32,
pub scroll_amount: Point,
pub scroll_amount_precise: (f32, f32),
pub is_flipped: bool,
}
Expand description
An event that the mouse wheel was scrolled.
Fields§
§timestamp: u32
When this event occurred.
window_id: u32
The id of the window focused.
mouse_id: u32
The id of the moved.
scroll_amount: Point
How much the wheel scrolled. X is the amount scrolled horizontally, positive to the right and negative to the left. Y is the amount scrolled vertically, positive away from the user and negative towards to the user.
scroll_amount_precise: (f32, f32)
How much the wheel scrolled with float precision. The first element is the amount scrolled horizontally, positive to the right and negative to the left. The second element is the amount scrolled vertically, positive away from the user and negative towards to the user.
The value returned from the API does not contain NaN or infinity number. You should not edit the value because that MouseWheelEvent
implements Eq
.
is_flipped: bool
Whether the scroll direction is inverted.
Trait Implementations§
source§impl Clone for MouseWheelEvent
impl Clone for MouseWheelEvent
source§fn clone(&self) -> MouseWheelEvent
fn clone(&self) -> MouseWheelEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MouseWheelEvent
impl Debug for MouseWheelEvent
source§impl From<SDL_MouseWheelEvent> for MouseWheelEvent
impl From<SDL_MouseWheelEvent> for MouseWheelEvent
source§impl PartialEq for MouseWheelEvent
impl PartialEq for MouseWheelEvent
source§fn eq(&self, other: &MouseWheelEvent) -> bool
fn eq(&self, other: &MouseWheelEvent) -> bool
self
and other
values to be equal, and is used
by ==
.