You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Get whether or not the cursor is locked in position, confined to the window, or free to move.
561
573
///
562
574
/// ## Platform-specific
563
575
///
564
576
/// - **`macOS`** doesn't support cursor lock, but most windowing plugins can emulate it. See [issue #4875](https://github.com/bevyengine/bevy/issues/4875#issuecomment-1153977546) for more information.
565
577
/// - **`iOS/Android`** don't have cursors.
566
578
#[inline]
567
-
pubfncursor_locked(&self) -> bool{
568
-
self.cursor_locked
579
+
pubfncursor_grab_mode(&self) -> CursorGrabMode{
580
+
self.cursor_grab_mode
569
581
}
570
-
/// Set whether or not the cursor is locked.
582
+
/// Set whether or not the cursor is locked in position, confined to the window, or free to move.
571
583
///
572
584
/// This doesn't hide the cursor. For that, use [`set_cursor_visibility`](Window::set_cursor_visibility)
573
585
///
574
586
/// ## Platform-specific
575
587
///
576
588
/// - **`macOS`** doesn't support cursor lock, but most windowing plugins can emulate it. See [issue #4875](https://github.com/bevyengine/bevy/issues/4875#issuecomment-1153977546) for more information.
/// - **`Windows`**, **`X11`**, and **`Wayland`**: The cursor is hidden only when inside the window. To stop the cursor from leaving the window, use [`set_cursor_lock_mode`](Window::set_cursor_lock_mode).
599
611
/// - **`macOS`**: The cursor is hidden only when the window is focused.
600
612
/// - **`iOS`** and **`Android`** do not have cursors
0 commit comments