Skip to content

Commit

Permalink
Update to Bevy 0.12 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
msklosak authored Jan 17, 2024
1 parent f1cf06c commit b0b80a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_console"
version = "0.9.0"
version = "0.10.0"
edition = "2021"
authors = ["RichoDemus <git@richodemus.com>"]
homepage = "https://github.com/RichoDemus/bevy-console"
Expand All @@ -10,14 +10,14 @@ license = "MIT"
readme = "README.md"

[dependencies]
bevy = { version = "0.11", default-features = false }
bevy = { version = "0.12", default-features = false }
clap = { version = "4.4.6", features = ["derive"] }
bevy_console_derive = { path = "./bevy_console_derive", version = "0.5.0" }
bevy_egui = "0.22"
bevy_egui = "0.23"
shlex = "1.1"

[dev-dependencies]
bevy = "0.11"
bevy = "0.12"

[workspace]
members = ["bevy_console_derive"]
2 changes: 1 addition & 1 deletion examples/raw_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn main() {
}

fn raw_commands(mut console_commands: EventReader<ConsoleCommandEntered>) {
for ConsoleCommandEntered { command_name, args } in console_commands.iter() {
for ConsoleCommandEntered { command_name, args } in console_commands.read() {
println!(r#"Entered command "{command_name}" with args {:#?}"#, args);
}
}
6 changes: 3 additions & 3 deletions src/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ unsafe impl<T: Command> SystemParam for ConsoleCommand<'_, T> {
change_tick,
);

let command = event_reader.iter().find_map(|command| {
let command = event_reader.read().find_map(|command| {
if T::name() == command.command_name {
let clap_command = T::command().no_binary_name(true);
// .color(clap::ColorChoice::Always);
Expand Down Expand Up @@ -334,7 +334,7 @@ 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 keyboard_input_events = keyboard_input_events.read().collect::<Vec<_>>();
let ctx = egui_context.ctx_mut();

let pressed = keyboard_input_events
Expand Down Expand Up @@ -479,7 +479,7 @@ pub(crate) fn receive_console_line(
mut console_state: ResMut<ConsoleState>,
mut events: EventReader<PrintConsoleLine>,
) {
for event in events.iter() {
for event in events.read() {
let event: &PrintConsoleLine = event;
console_state.scrollback.push(event.line.clone());
}
Expand Down

0 comments on commit b0b80a9

Please sign in to comment.