bevy/crates/bevy_window/src
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
..
cursor.rs Fix various typos (#5417) 2022-07-21 20:46:54 +00:00
event.rs Update MouseMotion and CursorMoved docs (#5090) 2022-06-26 13:40:43 +00:00
lib.rs Support monitor selection for all window modes. (#5878) 2022-09-06 14:45:44 +00:00
raw_window_handle.rs add more SAFETY comments and lint for missing ones in bevy_ecs (#4835) 2022-07-04 14:44:24 +00:00
system.rs Allow closing windows at runtime (#3575) 2022-05-05 13:35:43 +00:00
window.rs Support monitor selection for all window modes. (#5878) 2022-09-06 14:45:44 +00:00
windows.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00