pub struct Cursor { /* private fields */ }Expand description
Default cursor struct
Implementations§
Source§impl Cursor
impl Cursor
Sourcepub fn get_cursor() -> Self
pub fn get_cursor() -> Self
Get the cursor object
Sourcepub fn get_relative_position()
pub fn get_relative_position()
Returns the current position of the cursor relative to the window
Sourcepub fn get_position() -> (f64, f64)
pub fn get_position() -> (f64, f64)
Returns the current position of the cursor
Sourcepub fn change_position(&mut self, _new_pos: (f64, f64))
pub fn change_position(&mut self, _new_pos: (f64, f64))
Modify the cursor position
Sourcepub fn change_relative_position(&mut self, _new_pos: (f64, f64))
pub fn change_relative_position(&mut self, _new_pos: (f64, f64))
Modify the cursor position relative to the window
Sourcepub fn set_type(&mut self, mode: CursorType)
pub fn set_type(&mut self, mode: CursorType)
Set the cursor type
For example: CursorType::Pointer for click actions or CursorType::Custom(Path) for custom textures
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Detects if the cursor is visible or not
Trait Implementations§
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnwindSafe for Cursor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more