pub struct MouseBuf {
pub delta: (f32, f32),
pub wheel: (f32, f32),
pub x: f32,
pub y: f32,
/* private fields */
}Expand description
A container for Window-based mouse, tablet and touch input events.
Fields
delta: (f32, f32)Amount of mouse movement detected since the last update.
wheel: (f32, f32)Amount of wheel scroll detected since the last update.
x: f32y: f32Implementations
sourceimpl MouseBuf
impl MouseBuf
pub fn any_held(&self) -> bool
pub fn any_pressed(&self) -> bool
pub fn any_released(&self) -> bool
pub fn update(&mut self)
sourcepub fn handle_event(&mut self, event: &Event<'_, ()>) -> bool
pub fn handle_event(&mut self, event: &Event<'_, ()>) -> bool
Handles a single event.
pub fn is_held(&self, button: MouseButton) -> bool
pub fn is_pressed(&self, button: MouseButton) -> bool
pub fn is_released(&self, button: MouseButton) -> bool
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MouseBuf
impl Send for MouseBuf
impl Sync for MouseBuf
impl Unpin for MouseBuf
impl UnwindSafe for MouseBuf
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more