From da9fd9ec876ee1fe2f3d0c36d417ebd1765c3919 Mon Sep 17 00:00:00 2001 From: makspll Date: Fri, 14 Jul 2023 18:08:48 +0100 Subject: [PATCH] fix bevy 0.11 compatibility issue --- src/console.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/console.rs b/src/console.rs index c20567f..216e5be 100644 --- a/src/console.rs +++ b/src/console.rs @@ -334,14 +334,13 @@ pub(crate) fn console_ui( mut command_entered: EventWriter, mut console_open: ResMut, ) { - let keyboard_input_events = keyboard_input_events.iter().collect::>(); let ctx = egui_context.ctx_mut(); let pressed = keyboard_input_events .iter() .any(|code| console_key_pressed(code, &config.keys)); - + // always close if console open // avoid opening console if typing in another text input if pressed && (console_open.open || !ctx.wants_keyboard_input()) { @@ -438,7 +437,7 @@ pub(crate) fn console_ui( if keyboard_input_events .iter() .any(|&k| k.state.is_pressed() && k.key_code == Some(KeyCode::L)) - && (keys.any_pressed([KeyCode::LControl, KeyCode::RControl])) + && (keys.any_pressed([KeyCode::ControlLeft, KeyCode::ControlRight])) { state.scrollback.clear(); }