pub struct CursorState {
pub pos: (f32, f32),
pub outside_window: bool,
}Expand description
The latest sampled cursor state (window pixels, top-left origin), published
by InputSystem after each poll. GraphicsSystem reads it when building the
next frame’s draw list: follow_cursor sprites are positioned a frame after
the input that moved them, and the in-engine cursor stops drawing once the
real cursor has left the window (outside_window is false in fullscreen,
where the backend confines the cursor, and on backends without window-bounds
tracking).
Fields§
§pos: (f32, f32)Cursor position in window pixels, top-left origin.
outside_window: booltrue once the real cursor has left the window.
Trait Implementations§
Source§impl Clone for CursorState
impl Clone for CursorState
Source§fn clone(&self) -> CursorState
fn clone(&self) -> CursorState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CursorState
Source§impl Debug for CursorState
impl Debug for CursorState
Source§impl Default for CursorState
impl Default for CursorState
Source§fn default() -> CursorState
fn default() -> CursorState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CursorState
impl RefUnwindSafe for CursorState
impl Send for CursorState
impl Sync for CursorState
impl Unpin for CursorState
impl UnsafeUnpin for CursorState
impl UnwindSafe for CursorState
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