Skip to content

Commit

Permalink
Make CreateWindowParams type and create_windows system from `bevy…
Browse files Browse the repository at this point in the history
…_winit` public for manual window creation
  • Loading branch information
umut-sahin committed Mar 11, 2024
1 parent 686d354 commit 5b5c13a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions crates/bevy_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ mod winit_windows;
use approx::relative_eq;
use bevy_a11y::AccessibilityRequested;
use bevy_utils::Instant;
use system::{changed_windows, create_windows, despawn_windows, CachedWindow};
use system::{changed_windows, despawn_windows, CachedWindow};
use winit::dpi::{LogicalSize, PhysicalSize};
pub use winit_config::*;
pub use winit_event::*;
pub use winit_windows::*;
pub use system::create_windows;

use bevy_app::{App, AppExit, Last, Plugin, PluginsState};
use bevy_ecs::event::ManualEventReader;
Expand Down Expand Up @@ -232,7 +233,7 @@ impl Default for WinitAppRunnerState {
}
}

type CreateWindowParams<'w, 's, F = ()> = (
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
Original file line number Diff line number Diff line change
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

0 comments on commit 5b5c13a

Please sign in to comment.