bevy_console 0.2.3

dev console for bevy
docs.rs failed to build bevy_console-0.2.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: bevy_console-0.11.1

bevy console

A simple halflife2 style console
uses egui to draw the console

Example image

Usage

Add ConsolePlugin and optionally the resource ConsoleConfiguration

fn main() {
    App::build()
        .add_plugin(ConsolePlugin)
        .insert_resource(ConsoleConfiguration {
            // override config here
            ..Default::default()
        })
}

Create a system to listen to console events

fn listen_to_console_events(
    mut console_events: EventReader<ConsoleCommandEntered>,
) {
    for event in events.iter() {
        // event has 2 fields, commands and args
    }
}

If you want to send text to the console:

fn write_to_console(
    mut console_line: EventWriter<PrintConsoleLine>,
) {
    console_line.send(PrintConsoleLine::new("Hello".to_string()));
}

There's more examples in the examples directory, you'll need to enable the examples feature to run them though

cargo run --example basic_example --features examples

wasm

Should work in wasm, but you need to disable default features