diff options
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/src/windowing/window.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/engine/src/windowing/window.rs b/engine/src/windowing/window.rs index bfc6416..79b16e4 100644 --- a/engine/src/windowing/window.rs +++ b/engine/src/windowing/window.rs @@ -1,7 +1,6 @@ -use std::borrow::Cow; - use crate::data_types::dimens::Dimens; use crate::ecs::Component; +use crate::reflection::Reflection; pub mod platform; @@ -109,11 +108,11 @@ pub enum Fullscreen #[derive(Debug, Component, Clone, Copy)] pub struct CreationReady; -#[derive(Debug, Component)] +#[derive(Debug, Component, Reflection)] #[non_exhaustive] pub struct Window { - pub title: Cow<'static, str>, + pub title: String, pub cursor_visible: bool, pub cursor_grab_mode: CursorGrabMode, wid: Id, @@ -144,7 +143,7 @@ impl Window ) -> Self { Self { - title: creation_attrs.title().to_string().into(), + title: creation_attrs.title().to_string(), cursor_visible: true, cursor_grab_mode: CursorGrabMode::None, wid: Id::from_inner(winit_window.id()), @@ -173,7 +172,10 @@ impl Window #[derive(Debug, Component)] pub struct Closed; -#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[derive( + Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Reflection, +)] +#[repr(usize)] pub enum CursorGrabMode { #[default] |
