From 1d9ea5cd1993e5b9ae50539712a2a29dfadab971 Mon Sep 17 00:00:00 2001 From: Manuel Mauro Date: Mon, 8 Apr 2024 19:39:42 +0200 Subject: [PATCH] Remove debug ui --- src/game/ui/mod.rs | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/game/ui/mod.rs b/src/game/ui/mod.rs index 3a97e30..5421ff6 100644 --- a/src/game/ui/mod.rs +++ b/src/game/ui/mod.rs @@ -1,5 +1,4 @@ use bevy::prelude::*; -use bevy_egui::{egui, EguiContexts}; use crate::state::{AppState, OnGameScreen}; @@ -8,10 +7,7 @@ use self::{ text::{round_system, CurrentRoundText}, }; -use super::{ - core::{cue::CueEngine, round::Round, score::Score, state::GameState}, - settings::GameSettings, -}; +use super::settings::GameSettings; pub mod button; pub mod text; @@ -178,27 +174,3 @@ pub fn setup(mut commands: Commands, settings: Res, asset_server: }); }); } - -/// Debug interface. -pub fn debug_ui( - mut egui_context: EguiContexts, - mut query: Query<(&CueEngine, &Round, &Score, &mut GameState)>, -) { - if let Ok((engine, round, score, mut state)) = query.get_single_mut() { - egui::Window::new("debug").show(egui_context.ctx_mut(), |ui| { - ui.label(format!("N-back: {}", engine.n())); - ui.label(format!("Correct: {}", score.correct())); - ui.label(format!("Wrong: {}", score.wrong())); - ui.label(format!("Answer: {:?}", round.answer)); - ui.label(format!("Score: {}", score.f1_score_percent())); - - if ui.button("Play").clicked() { - *state = GameState::Playing; - } - - if ui.button("Pause").clicked() { - *state = GameState::Paused; - } - }); - } -}