diff options
| author | HampusM <hampus@hampusmat.com> | 2026-07-21 14:32:26 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-07-21 14:32:26 +0200 |
| commit | 63675d4168224b66d28c9d64a8e121ef397d4edd (patch) | |
| tree | 2c2c13535b971dd95a354099347cd6a530e16796 /engine/src/windowing.rs | |
| parent | 67bb995ffdd201997758701eeda35b4373b51104 (diff) | |
refactor(engine): use pair macro in phase entity declarations
Diffstat (limited to 'engine/src/windowing.rs')
| -rw-r--r-- | engine/src/windowing.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/engine/src/windowing.rs b/engine/src/windowing.rs index 6997f73..b59075e 100644 --- a/engine/src/windowing.rs +++ b/engine/src/windowing.rs @@ -20,6 +20,7 @@ use winit::keyboard::PhysicalKey; use winit::monitor::MonitorHandle as WinitMonitorHandle; use winit::window::{Window as WinitWindow, WindowId as WinitWindowId}; +use crate::ecs::pair; use crate::ecs::actions::Actions; use crate::ecs::component::Component; use crate::ecs::entity::obtainer::Obtainer as EntityObtainer; @@ -66,16 +67,9 @@ const TEXT_KEY_QUEUE_SIZE: usize = 255; static CONTEXT_CREATED: AtomicBool = AtomicBool::new(false); -declare_entity!( - pub PHASE, - ( - Phase, - Pair::builder() - .relation::<ChildOf>() - .target_id(*UPDATE_PHASE) - .build() - ) -); +declare_entity! { +pub PHASE: (Phase, pair!(ChildOf, { *UPDATE_PHASE })); +} #[derive(Debug, Default)] #[non_exhaustive] |
