Mouse capture API #642
Labels
A-Input
Player input via keyboard, mouse, gamepad, and more
A-Windowing
Platform-agnostic interface layer to run your app in
C-Feature
A new feature, making something new possible
The pull request "Add mouse capture example" and the recipe "Grabbing the mouse" in the Bevy cookbook both illustrate how mouse capturing is done currently. It's done using the Winit API directly (though
WinitWindows
), which ties these Bevy apps to using Winit's backends.Bevy should have a mouse capture API that lets us do the same thing, but on a higher level of abstraction that isn't tied directly to Winit.
In the short term, @cart is cool with adding more properties to the existing
WindowDescriptor
to unblock scenarios like mouse grabbing, but in the medium term one issue is that Bevy doesn't let you set window properties on demand like you can with Winit (see comment and issue #641).The text was updated successfully, but these errors were encountered: