diff --git a/crates/bevy_window/src/lib.rs b/crates/bevy_window/src/lib.rs index 3ae1c083c8f2e..79d15d724e737 100644 --- a/crates/bevy_window/src/lib.rs +++ b/crates/bevy_window/src/lib.rs @@ -38,12 +38,15 @@ impl Default for WindowPlugin { /// A [`Plugin`] that defines an interface for windowing support in Bevy. pub struct WindowPlugin { - /// Settings for the primary window. This will be spawned by - /// default, with the marker component [`PrimaryWindow`](PrimaryWindow). - /// If you want to run without a primary window you should set this to `None`. + /// Settings for the primary window. /// - /// Note that if there are no windows, by default the App will exit, - /// due to [`exit_on_all_closed`]. + /// `Some(custom_window)` will spawn an entity with `custom_window` and [`PrimaryWindow`] as components. + /// `None` will not spawn a primary window. + /// + /// Defaults to `Some(Window::default())`. + /// + /// Note that if there are no windows the App will exit (by default) due to + /// [`exit_on_all_closed`]. pub primary_window: Option, /// Whether to exit the app when there are no open windows. diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs index f73fe315830fc..f6346500eba4c 100644 --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -16,8 +16,9 @@ use crate::CursorIcon; /// /// Currently this is assumed to only exist on 1 entity at a time. /// -/// [`WindowPlugin`](crate::WindowPlugin) will spawn a window entity -/// with this component if `primary_window` is `Some`. +/// [`WindowPlugin`](crate::WindowPlugin) will spawn a [`Window`] entity +/// with this component if [`primary_window`](crate::WindowPlugin::primary_window) +/// is `Some`. #[derive(Default, Debug, Component, PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Reflect)] #[reflect(Component)] pub struct PrimaryWindow; @@ -234,16 +235,16 @@ impl Default for Window { } impl Window { - /// Setting this to true will attempt to maximize the window. + /// Setting to true will attempt to maximize the window. /// - /// Setting it to false will attempt to un-maximize the window. + /// Setting to false will attempt to un-maximize the window. pub fn set_maximized(&mut self, maximized: bool) { self.internal.maximize_request = Some(maximized); } - /// Setting this to true will attempt to minimize the window. + /// Setting to true will attempt to minimize the window. /// - /// Setting it to false will attempt to un-minimize the window. + /// Setting to false will attempt to un-minimize the window. pub fn set_minimized(&mut self, minimized: bool) { self.internal.minimize_request = Some(minimized); }