From a4e46e4e564882b40605517ae8053e027befbea3 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sat, 8 Nov 2025 14:28:29 -0500 Subject: graphics: refactor debug ui --- game/Cargo.toml | 3 +-- game/src/main.rs | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'game') diff --git a/game/Cargo.toml b/game/Cargo.toml index 2cfa795..2792e83 100644 --- a/game/Cargo.toml +++ b/game/Cargo.toml @@ -15,7 +15,6 @@ graphics.workspace = true workspace = true [features] -default = ["debug"] -debug = ["graphics/debug"] +default = [] wayland = ["graphics/wayland"] sdl = ["graphics/sdl"] diff --git a/game/src/main.rs b/game/src/main.rs index 1c76abc..ae92e12 100644 --- a/game/src/main.rs +++ b/game/src/main.rs @@ -11,6 +11,11 @@ fn main() -> Result<()> { while window.is_open() { // TODO update game state + // Handle keyboard input + if window.is_key_pressed(KeyCode::KEY_F3) { + window.toggle_debug(); + } + for enemy in dungeon.enemies.iter_mut() { enemy.handle_movement( dungeon.player.entity.pos, -- cgit v1.2.3-freya