Add bevy_window::Window
options for MacOS
#15820
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
MacOS has some nice options for controlling the window and titlebar to make the content appear much more "immersively" in the window. This PR exposes options for controlling this.
Solution
Adds new fields to
Window
to control these, with doc comments to explain what they do and that they're MacOS only.Testing
Tested on a MacOS machine (not my own, I don't have one). That's where the below screenshots were taken.
Showcase
On MacOS, you now have more options for configuring the window titlebar. You can, for example, make the title bar transparent and only show the window controls. This provides a more "immersive" experience for your rendered content.
Before, only this was possible:
Now, you can create windows like this:
This uses the following
bevy_window::Window
settings:Migration Guide
bevy_window::Window
now has extra fields for configuring MacOS window settings:Using
Window::default
keeps the same behaviour as before.