use bevy_ecs::resource::Resource; use winit::{dpi::PhysicalSize, window::WindowAttributes}; #[derive(Resource, Clone)] pub struct WindowConfig { pub title: String, pub width: u32, pub height: u32, } impl Into for &WindowConfig { fn into(self) -> WindowAttributes { WindowAttributes::default() .with_title(self.title.clone()) .with_inner_size(PhysicalSize::new(self.width as f64, self.height as f64)) } }