summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-11-08 14:28:29 -0500
committerFreya Murphy <freya@freyacat.org>2025-11-08 14:28:29 -0500
commita4e46e4e564882b40605517ae8053e027befbea3 (patch)
tree0cb7c4319beec2ece95af11673bc0e5e8e0fa0ac /game
parentassets: extend font (diff)
downloadDungeonCrawl-a4e46e4e564882b40605517ae8053e027befbea3.tar.gz
DungeonCrawl-a4e46e4e564882b40605517ae8053e027befbea3.tar.bz2
DungeonCrawl-a4e46e4e564882b40605517ae8053e027befbea3.zip
graphics: refactor debug ui
Diffstat (limited to 'game')
-rw-r--r--game/Cargo.toml3
-rw-r--r--game/src/main.rs5
2 files changed, 6 insertions, 2 deletions
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,