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
/// - **`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.
610
+
/// - **`macOS`** doesn't support cursor grab, but most windowing plugins can emulate it. See [issue #4875](https://github.com/bevyengine/bevy/issues/4875#issuecomment-1153977546) for more information.
600
611
/// - **`iOS/Android`** don't have cursors.
601
612
#[inline]
602
-
pubfncursor_locked(&self) -> bool{
603
-
self.cursor_locked
613
+
pubfncursor_grab_mode(&self) -> CursorGrabMode{
614
+
self.cursor_grab_mode
604
615
}
605
-
/// Set whether or not the cursor is locked.
616
+
/// Set whether and how the cursor is grabed.
606
617
///
607
618
/// This doesn't hide the cursor. For that, use [`set_cursor_visibility`](Window::set_cursor_visibility)
608
619
///
609
620
/// ## Platform-specific
610
621
///
611
-
/// - **`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.
622
+
/// - **`macOS`** doesn't support cursor grab, 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).
633
+
/// - **`Windows`**, **`X11`**, and **`Wayland`**: The cursor is hidden only when inside the window. To stop the cursor from leaving the window, use [`set_cursor_grab_mode`](Window::set_cursor_grab_mode).
623
634
/// - **`macOS`**: The cursor is hidden only when the window is focused.
624
635
/// - **`iOS`** and **`Android`** do not have cursors
625
636
#[inline]
@@ -630,7 +641,7 @@ impl Window {
630
641
///
631
642
/// ## Platform-specific
632
643
///
633
-
/// - **`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).
644
+
/// - **`Windows`**, **`X11`**, and **`Wayland`**: The cursor is hidden only when inside the window. To stop the cursor from leaving the window, use [`set_cursor_grab_mode`](Window::set_cursor_grab_mode).
634
645
/// - **`macOS`**: The cursor is hidden only when the window is focused.
635
646
/// - **`iOS`** and **`Android`** do not have cursors
0 commit comments