From 655d747c825a4c6a8b3ccb945a994d6258534549 Mon Sep 17 00:00:00 2001 From: LoipesMas <46327403+LoipesMas@users.noreply.github.com> Date: Mon, 13 Jun 2022 21:37:07 +0200 Subject: [PATCH] Improve documentation and naming --- crates/bevy_window/src/window.rs | 8 +++++--- crates/bevy_winit/src/winit_windows.rs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs index 206aac8436a3a..9dd4320b35938 100644 --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -729,13 +729,15 @@ impl Window { /// Defines where window should be placed at on creation. #[derive(Debug, Clone)] pub enum WindowPosition { - /// Position will be set by window manager + /// Position will be set by the window manager Automatic, /// Window will be centered on the primary monitor /// /// Note that this does not account for window decorations. Centered, - /// Window will be placed at specified position + /// The window's top-left corner will be placed at the specified position (in pixels) + /// + /// (0,0) represents top-left corner of screen space. At(Vec2), } @@ -822,7 +824,7 @@ impl Default for WindowDescriptor { title: "app".to_string(), width: 1280., height: 720., - position: WindowPosition::Default, + position: WindowPosition::Automatic, resize_constraints: WindowResizeConstraints::default(), scale_factor_override: None, present_mode: PresentMode::Fifo, diff --git a/crates/bevy_winit/src/winit_windows.rs b/crates/bevy_winit/src/winit_windows.rs index 74a374863d060..a2fea74aa0d4d 100644 --- a/crates/bevy_winit/src/winit_windows.rs +++ b/crates/bevy_winit/src/winit_windows.rs @@ -51,7 +51,7 @@ impl WinitWindows { use bevy_window::WindowPosition::*; match position { - Default => { /* Window manager will handle position */ } + Automatic => { /* Window manager will handle position */ } Centered => { if let Some(monitor) = event_loop.primary_monitor() { let screen_size = monitor.size();