-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Abstract out CursorIcon from bevy_winit #20182
Copy link
Copy link
Closed
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsA-WindowingPlatform-agnostic interface layer to run your app inPlatform-agnostic interface layer to run your app inC-FeatureA new feature, making something new possibleA new feature, making something new possibleS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
Metadata
Metadata
Assignees
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsA-WindowingPlatform-agnostic interface layer to run your app inPlatform-agnostic interface layer to run your app inC-FeatureA new feature, making something new possibleA new feature, making something new possibleS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
What problem does this solve or what need does it fill?
bevy_winitis supposed to be the "backend" for bevy_window, whereby you could have different backends for different environments. However, exportingCursorIconmeans that the abstraction leaks: anyone who uses cursors is now tied to a particular windowing backend.What solution would you like?
We need to have a universal
Cursordefinition that is independent of any particular windowing system.Now, it might seem a challenge to do this because the existing
CursorIconhas a bunch of built-in "standard" cursors which might not be present on other windowing backends. However, the built-in winit cursors are exactly the same as the standard CSS browser cursors (or at least, a subset of them), so there's a good chance that any other windowing system will support a similar set of cursors; and if not, we can probably emulate them to bring the various platforms up to par.What alternative(s) have you considered?
Well, the main alternative is to assume that we're always and forever going to be using winit as the backend. But this probably isn't going to fly.
Either that, or simply disable custom cursors in other environments.