forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support monitor selection for all window modes. (bevyengine#5878)
# Objective Support monitor selection for all window modes. Fixes bevyengine#5875. ## Changelog * Moved `MonitorSelection` out of `WindowPosition::Centered`, into `WindowDescriptor`. * `WindowPosition::At` is now relative to the monitor instead of being in 'desktop space'. * Renamed `MonitorSelection::Number` to `MonitorSelection::Index` for clarity. * Added `WindowMode` to the prelude. * `Window::set_position` is now relative to a monitor and takes a `MonitorSelection` as argument. ## Migration Guide `MonitorSelection` was moved out of `WindowPosition::Centered`, into `WindowDescriptor`. `MonitorSelection::Number` was renamed to `MonitorSelection::Index`. ```rust // Before .insert_resource(WindowDescriptor { position: WindowPosition::Centered(MonitorSelection::Number(1)), ..default() }) // After .insert_resource(WindowDescriptor { monitor: MonitorSelection::Index(1), position: WindowPosition::Centered, ..default() }) ``` `Window::set_position` now takes a `MonitorSelection` as argument. ```rust window.set_position(MonitorSelection::Current, position); ``` Co-authored-by: devil-ira <justthecooldude@gmail.com>
- Loading branch information
Showing
4 changed files
with
141 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters