Re-added vanilla input integration
This commit is contained in:
parent
652a17e0f9
commit
6159d531b3
2014
Cargo.lock
generated
2014
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "bevy_terminal_display"
|
||||
version = "0.5.1"
|
||||
version = "0.6"
|
||||
edition = "2021"
|
||||
license = "0BSD OR MIT OR Apache-2.0"
|
||||
description = "A plugin for the Bevy game engine which enables rendering to a terminal using unicode braille characters."
|
||||
@ -14,7 +14,7 @@ bevy_headless_render = "0.2"
|
||||
bevy_dither_post_process = "0.3"
|
||||
ratatui = "0.29"
|
||||
color-eyre = "0.6"
|
||||
leafwing-input-manager = "0.15"
|
||||
leafwing-input-manager = "0.16"
|
||||
serde = "1.0"
|
||||
smol_str = "0.2"
|
||||
|
||||
|
@ -23,9 +23,9 @@ Features Include:
|
||||
## Compatibility
|
||||
|
||||
| Crate Version | Bevy Version |
|
||||
|--- |--- |
|
||||
| 0.5 | 0.15 |
|
||||
| 0.3-0.4 | 0.14 |
|
||||
| ------------- | ------------ |
|
||||
| 0.6 | 0.15 |
|
||||
| 0.4 | 0.14 |
|
||||
| 0.2 | 0.13 |
|
||||
|
||||
## Installation
|
||||
|
@ -54,13 +54,22 @@ pub fn input_handling(
|
||||
if let Some(key_code) = crossterm_keycode_to_bevy_keycode(event.code) {
|
||||
if let Some(logical_key) = crossterm_keycode_to_bevy_key(event.code) {
|
||||
match event.kind {
|
||||
KeyEventKind::Press | KeyEventKind::Repeat => {
|
||||
// input.press(event.code);
|
||||
KeyEventKind::Press => {
|
||||
key_event_writer.send(KeyboardInput {
|
||||
key_code,
|
||||
logical_key,
|
||||
state: ButtonState::Pressed,
|
||||
window,
|
||||
repeat: false,
|
||||
});
|
||||
}
|
||||
KeyEventKind::Repeat => {
|
||||
key_event_writer.send(KeyboardInput {
|
||||
key_code,
|
||||
logical_key,
|
||||
state: ButtonState::Pressed,
|
||||
window,
|
||||
repeat: true,
|
||||
});
|
||||
}
|
||||
KeyEventKind::Release => {
|
||||
@ -69,6 +78,7 @@ pub fn input_handling(
|
||||
logical_key,
|
||||
state: ButtonState::Released,
|
||||
window,
|
||||
repeat: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user