mirror of
https://codeberg.org/schrottkatze/mgd2-tram-championships.git
synced 2025-07-02 09:37:40 +00:00
make debug console top level
This commit is contained in:
parent
d79475ae2a
commit
4c24f67cd5
9 changed files with 111 additions and 68 deletions
|
@ -1,19 +0,0 @@
|
|||
use bevy::prelude::*;
|
||||
use clap::Subcommand;
|
||||
|
||||
mod console;
|
||||
|
||||
#[derive(Event, Debug, Subcommand)]
|
||||
enum DebugEvent {
|
||||
/// Close the debug console.
|
||||
#[command(name = "close", aliases = ["close-console"])]
|
||||
CloseDebugConsole,
|
||||
|
||||
/// Output a string to the console.
|
||||
#[command(name = "echo", aliases = ["print", "print-to-console"])]
|
||||
PrintToConsole { text: String },
|
||||
}
|
||||
|
||||
pub(super) fn plugin(app: &mut App) {
|
||||
app.add_plugins(console::plugin).add_event::<DebugEvent>();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue