[−][src]Struct azul_core::window::MouseState
Mouse position, cursor type, user scroll input, etc.
Fields
mouse_cursor_type: Option<MouseCursorType>
Current mouse cursor type, set to None
if the cursor is hidden. (READWRITE)
cursor_position: CursorPosition
Where is the mouse cursor currently? Set to None
if the window is not focused. (READWRITE)
is_cursor_locked: bool
Is the mouse cursor locked to the current window (important for applications like games)? (READWRITE)
left_down: bool
Is the left mouse button down? (READONLY)
right_down: bool
Is the right mouse button down? (READONLY)
middle_down: bool
Is the middle mouse button down? (READONLY)
scroll_x: Option<f32>
Scroll amount in pixels in the horizontal direction. Gets reset to 0 after every frame (READONLY)
scroll_y: Option<f32>
Scroll amount in pixels in the vertical direction. Gets reset to 0 after every frame (READONLY)
Implementations
impl MouseState
[src]
pub fn mouse_down(&self) -> bool
[src]
Returns whether any mouse button (left, right or center) is currently held down
pub fn get_scroll_x(&self) -> f32
[src]
pub fn get_scroll_y(&self) -> f32
[src]
pub fn get_scroll(&self) -> (f32, f32)
[src]
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]
impl PartialEq<MouseState> for MouseState
[src]
fn eq(&self, other: &MouseState) -> bool
[src]
fn ne(&self, other: &MouseState) -> bool
[src]
impl PartialOrd<MouseState> for MouseState
[src]
fn partial_cmp(&self, other: &MouseState) -> Option<Ordering>
[src]
fn lt(&self, other: &MouseState) -> bool
[src]
fn le(&self, other: &MouseState) -> bool
[src]
fn gt(&self, other: &MouseState) -> bool
[src]
fn ge(&self, other: &MouseState) -> bool
[src]
impl StructuralPartialEq for MouseState
[src]
Auto Trait Implementations
impl RefUnwindSafe for MouseState
impl Send for MouseState
impl Sync for MouseState
impl Unpin for MouseState
impl UnwindSafe for MouseState
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,