aboutsummaryrefslogtreecommitdiff
path: root/src/input/systems.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <[email protected]>2024-07-31 11:44:07 -0400
committerLibravatar Silas Bartha <[email protected]>2024-07-31 11:44:07 -0400
commitef0771d67ca4b50a10c140ec8fb6bd24f05958d6 (patch)
tree95dc1a9c361ebfb01ef0c65d2c4756b657ff8b20 /src/input/systems.rs
parent72da32574eea22921da0fb9e7affb1e0f8a3c57f (diff)
Add "just pressed" input trackingv0.4.0
Diffstat (limited to 'src/input/systems.rs')
-rw-r--r--src/input/systems.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input/systems.rs b/src/input/systems.rs
index 9560e1e..9be9f25 100644
--- a/src/input/systems.rs
+++ b/src/input/systems.rs
@@ -29,7 +29,8 @@ pub fn input_handling(
mut input: ResMut<TerminalInput>,
mut event_writer: EventWriter<TerminalInputEvent>,
) {
- input.clear_released();
+ input.clear_just_released();
+ input.clear_just_pressed();
let mut event_queue = event_queue.0.lock().unwrap();
let mut key_events = Vec::<KeyEvent>::new();
while let Some(event) = event_queue.pop() {
@@ -51,4 +52,4 @@ pub fn input_handling(
_ => (),
}
}
-} \ No newline at end of file
+}