Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CreateWindowParams type and create_windows system public #12428

Merged
merged 1 commit into from Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/bevy_winit/src/lib.rs
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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>,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_winit/src/system.rs
Expand Up @@ -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<F: QueryFilter + 'static>(
pub fn create_windows<F: QueryFilter + 'static>(
event_loop: &EventLoopWindowTarget<crate::UserEvent>,
(
mut commands,
Expand Down