summaryrefslogtreecommitdiff
path: root/engine/src/input.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-07-21 14:32:26 +0200
committerHampusM <hampus@hampusmat.com>2026-07-21 14:32:26 +0200
commit63675d4168224b66d28c9d64a8e121ef397d4edd (patch)
tree2c2c13535b971dd95a354099347cd6a530e16796 /engine/src/input.rs
parent67bb995ffdd201997758701eeda35b4373b51104 (diff)
refactor(engine): use pair macro in phase entity declarations
Diffstat (limited to 'engine/src/input.rs')
-rw-r--r--engine/src/input.rs17
1 files changed, 5 insertions, 12 deletions
diff --git a/engine/src/input.rs b/engine/src/input.rs
index 0234b4b..a86cb1a 100644
--- a/engine/src/input.rs
+++ b/engine/src/input.rs
@@ -1,22 +1,15 @@
-use crate::ecs::declare_entity;
+use crate::ecs::{declare_entity, pair};
use crate::ecs::extension::Collector as ExtensionCollector;
-use crate::ecs::pair::{ChildOf, Pair};
+use crate::ecs::pair::ChildOf;
use crate::ecs::phase::Phase;
use crate::windowing::PHASE as WINDOWING_PHASE;
pub mod keyboard;
pub mod mouse;
-declare_entity!(
- pub PHASE,
- (
- Phase,
- Pair::builder()
- .relation::<ChildOf>()
- .target_id(*WINDOWING_PHASE)
- .build()
- )
-);
+declare_entity! {
+pub PHASE: (Phase, pair!(ChildOf, { *WINDOWING_PHASE }));
+}
/// Input extension.
#[derive(Debug, Default)]