[−][src]Struct ps2_mouse::MouseState
A snapshot of the mouse flags, x delta and y delta.
Methods
impl MouseState
[src]
pub const fn new() -> MouseState
[src]
Returns a new MouseState
.
pub fn left_button_down(&self) -> bool
[src]
Returns true if the left mouse button is currently down.
pub fn left_button_up(&self) -> bool
[src]
Returns true if the left mouse button is currently up.
pub fn right_button_down(&self) -> bool
[src]
Returns true if the right mouse button is currently down.
pub fn right_button_up(&self) -> bool
[src]
Returns true if the right mouse button is currently up.
pub fn x_moved(&self) -> bool
[src]
Returns true if the x axis has moved.
pub fn y_moved(&self) -> bool
[src]
Returns true if the y axis has moved.
pub fn moved(&self) -> bool
[src]
Returns true if the x or y axis has moved.
pub fn get_x(&self) -> i16
[src]
Returns the x delta of the mouse state.
pub fn get_y(&self) -> i16
[src]
Returns the y delta of the mouse state.
Trait Implementations
impl Clone for MouseState
[src]
fn clone(&self) -> MouseState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MouseState
[src]
impl Debug for MouseState
[src]
impl Default for MouseState
[src]
fn default() -> MouseState
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,