diff options
author | Silas Bartha <[email protected]> | 2024-07-31 11:44:07 -0400 |
---|---|---|
committer | Silas Bartha <[email protected]> | 2024-07-31 11:44:07 -0400 |
commit | ef0771d67ca4b50a10c140ec8fb6bd24f05958d6 (patch) | |
tree | 95dc1a9c361ebfb01ef0c65d2c4756b657ff8b20 /src/input/systems.rs | |
parent | 72da32574eea22921da0fb9e7affb1e0f8a3c57f (diff) |
Add "just pressed" input trackingv0.4.0
Diffstat (limited to 'src/input/systems.rs')
-rw-r--r-- | src/input/systems.rs | 5 |
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 +} |