Skip to content

Commit c595c73

Browse files
committed
Move the description of the mouse grab example
1 parent 069d6e8 commit c595c73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bevy-cookbook.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ to hook into the `winit` api as below. Note that this will cause events such as
155155
`CursorMoved` to always trigger with the same position due to the position being
156156
locked. However, `MouseMotion` events will still fire so the delta can be used.
157157

158+
An example system to lock/unlock the mouse, triggered by a custom event:
159+
158160
```rust
159-
// An example system to lock/unlock the mouse, triggered by a custom event.
160161
use bevy::{window::WindowId, winit::WinitWindows};
161162

162163
// To track if we want the cursor to be locked or unlocked.

0 commit comments

Comments
 (0)