Split crates
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 7m49s

This commit is contained in:
Florian RICHER 2025-05-18 13:15:29 +02:00
parent 99be029ff8
commit b977f446d3
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
16 changed files with 84 additions and 110 deletions

View file

@ -0,0 +1,17 @@
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<WindowAttributes> 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))
}
}