diff options
author | HampusM <hampus@hampusmat.com> | 2025-08-09 14:03:42 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-08-09 14:03:42 +0200 |
commit | fb9263ff3fd6211d5ca19e182094e25835886503 (patch) | |
tree | ff6eb14bf252c220c712e2a4bbd6d03c6d610e47 /engine/src/input.rs | |
parent | bb7c7d2f7d9bd9ad074c0186f5d503ee96b2f106 (diff) |
Diffstat (limited to 'engine/src/input.rs')
-rw-r--r-- | engine/src/input.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/src/input.rs b/engine/src/input.rs index d6a82f6..af89271 100644 --- a/engine/src/input.rs +++ b/engine/src/input.rs @@ -4,7 +4,7 @@ use ecs::extension::Collector as ExtensionCollector; use ecs::pair::{ChildOf, Pair}; use ecs::phase::{Phase, PRE_UPDATE as PRE_UPDATE_PHASE, START as START_PHASE}; use ecs::sole::Single; -use ecs::{static_entity, Sole}; +use ecs::{declare_entity, Sole}; use crate::vector::Vec2; use crate::window::{Window, UPDATE_PHASE as WINDOW_UPDATE_PHASE}; @@ -16,7 +16,7 @@ mod reexports pub use reexports::*; -static_entity!( +declare_entity!( SET_PREV_KEY_STATE_PHASE, (Phase, Pair::new::<ChildOf>(*WINDOW_UPDATE_PHASE)) ); @@ -149,6 +149,8 @@ impl ecs::extension::Extension for Extension { fn collect(self, mut collector: ExtensionCollector<'_>) { + collector.add_declared_entity(&SET_PREV_KEY_STATE_PHASE); + collector.add_system(*START_PHASE, initialize); collector.add_system(*PRE_UPDATE_PHASE, maybe_clear_cursor_is_first_move); collector.add_system(*SET_PREV_KEY_STATE_PHASE, set_pending_key_states); |