mirror of
https://codeberg.org/schrottkatze/mgd2-tram-championships.git
synced 2025-07-02 09:37:40 +00:00
refactor console to take DebugEvent
s directly
This commit is contained in:
parent
cf05050c95
commit
3157af2c2b
3 changed files with 11 additions and 14 deletions
|
@ -1,11 +1,17 @@
|
|||
use bevy::prelude::*;
|
||||
use clap::Subcommand;
|
||||
|
||||
mod console;
|
||||
|
||||
#[derive(Event)]
|
||||
#[derive(Event, Debug, Subcommand)]
|
||||
enum DebugEvent {
|
||||
/// Close the debug console.
|
||||
#[command(name = "close", aliases = ["close-console"])]
|
||||
CloseDebugConsole,
|
||||
PrintToConsole(String),
|
||||
|
||||
/// Output a string to the console.
|
||||
#[command(name = "echo", aliases = ["print", "print-to-console"])]
|
||||
PrintToConsole { text: String },
|
||||
}
|
||||
|
||||
pub(super) fn plugin(app: &mut App) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue