Skip to content

Commit

Permalink
Improve documentation and naming
Browse files Browse the repository at this point in the history
  • Loading branch information
LoipesMas committed Jun 20, 2022
1 parent 96ef2b1 commit 655d747
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions crates/bevy_window/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_winit/src/winit_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 655d747

Please sign in to comment.