summaryrefslogtreecommitdiff
path: root/engine/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/input.rs')
-rw-r--r--engine/src/input.rs6
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);