bevy/crates/bevy_winit
ira 28c16b9713 Support monitor selection for all window modes. (#5878)
# Objective
Support monitor selection for all window modes.
Fixes #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>
2022-09-06 14:45:44 +00:00
..
src Support monitor selection for all window modes. (#5878) 2022-09-06 14:45:44 +00:00
Cargo.toml Bump Version after Release (#5576) 2022-08-05 02:03:05 +00:00