make debug console top level

This commit is contained in:
Schrottkatze 2025-06-18 17:13:52 +02:00
parent d79475ae2a
commit 4c24f67cd5
Signed by: schrottkatze
SSH key fingerprint: SHA256:FPOYVeBy3QP20FEM42uWF1Wa/Qhlk+L3S2+Wuau/Auo
9 changed files with 111 additions and 68 deletions

View file

@ -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>();
}