diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 1e638e1a5eff7..9992178a78114 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -16,7 +16,8 @@ mod winit_windows; use approx::relative_eq; use bevy_a11y::AccessibilityRequested; use bevy_utils::Instant; -use system::{changed_windows, create_windows, despawn_windows, CachedWindow}; +pub use system::create_windows; +use system::{changed_windows, despawn_windows, CachedWindow}; use winit::dpi::{LogicalSize, PhysicalSize}; pub use winit_config::*; pub use winit_event::*; @@ -232,7 +233,8 @@ impl Default for WinitAppRunnerState { } } -type CreateWindowParams<'w, 's, F = ()> = ( +/// The parameters of the [`create_windows`] system. +pub type CreateWindowParams<'w, 's, F = ()> = ( Commands<'w, 's>, Query<'w, 's, (Entity, &'static mut Window), F>, EventWriter<'w, WindowCreated>, diff --git a/crates/bevy_winit/src/system.rs b/crates/bevy_winit/src/system.rs index 0000c45369d44..44bcc43e6c76e 100644 --- a/crates/bevy_winit/src/system.rs +++ b/crates/bevy_winit/src/system.rs @@ -34,7 +34,7 @@ use crate::{ /// If any of these entities are missing required components, those will be added with their /// default values. #[allow(clippy::too_many_arguments)] -pub(crate) fn create_windows( +pub fn create_windows( event_loop: &EventLoopWindowTarget, ( mut commands,