From b8d6216febd18b3be21740abe8d136c4af840d1b Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Tue, 28 May 2024 13:39:02 +0200 Subject: [PATCH] added d key to toggle debugging --- README.md | 1 + scene-play.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 0f24f7f..c844a9e 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ While it runs, there are a couple of commands you can use: * s: save game state to file (can be loaded with -l) * c: enter copy mode. Mark a rectangle with the mouse, when you release the mous button it is being saved to an RLE file +* d: toggle debug output * q: quit # Report bugs diff --git a/scene-play.go b/scene-play.go index 2466acd..72cf16e 100644 --- a/scene-play.go +++ b/scene-play.go @@ -203,6 +203,10 @@ func (scene *ScenePlay) CheckInput() { scene.Reset() } + if inpututil.IsKeyJustPressed(ebiten.KeyD) { + scene.Config.Debug = !scene.Config.Debug + } + if scene.Paused { if inpututil.IsKeyJustPressed(ebiten.KeyN) { scene.Config.RunOneStep = true