Skip to content

Commit

Permalink
fix bevy 0.11 compatibility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
makspll committed Jul 14, 2023
1 parent ffa19d3 commit da9fd9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,13 @@ pub(crate) fn console_ui(
mut command_entered: EventWriter<ConsoleCommandEntered>,
mut console_open: ResMut<ConsoleOpen>,
) {

let keyboard_input_events = keyboard_input_events.iter().collect::<Vec<_>>();
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()) {
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit da9fd9e

Please sign in to comment.