Make CreateWindowParams
type and create_windows
system public (#12428)
# Objective To have a user level workaround for #12237. ## Solution Workaround to the problem is described in: https://github.com/bevyengine/bevy/issues/12237#issuecomment-1983680632 ## Changelog ### Changed - `CreateWindowParams` type and `create_windows` system from `bevy_winit` is now public, which allows library authors and game developers to manually trigger window creation when needed.
This commit is contained in:
parent
17005b3c8b
commit
76f09e5be2
@ -14,7 +14,8 @@ mod winit_windows;
|
|||||||
use approx::relative_eq;
|
use approx::relative_eq;
|
||||||
use bevy_a11y::AccessibilityRequested;
|
use bevy_a11y::AccessibilityRequested;
|
||||||
use bevy_utils::Instant;
|
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};
|
use winit::dpi::{LogicalSize, PhysicalSize};
|
||||||
pub use winit_config::*;
|
pub use winit_config::*;
|
||||||
pub use winit_windows::*;
|
pub use winit_windows::*;
|
||||||
@ -228,7 +229,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>,
|
Commands<'w, 's>,
|
||||||
Query<'w, 's, (Entity, &'static mut Window), F>,
|
Query<'w, 's, (Entity, &'static mut Window), F>,
|
||||||
EventWriter<'w, WindowCreated>,
|
EventWriter<'w, WindowCreated>,
|
||||||
|
@ -31,7 +31,7 @@ use crate::{
|
|||||||
/// If any of these entities are missing required components, those will be added with their
|
/// If any of these entities are missing required components, those will be added with their
|
||||||
/// default values.
|
/// default values.
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[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>,
|
event_loop: &EventLoopWindowTarget<crate::UserEvent>,
|
||||||
(
|
(
|
||||||
mut commands,
|
mut commands,
|
||||||
|
Loading…
Reference in New Issue
Block a user