From 0f78406cde7890f3f9b16cd0ba55afac4c9065cf Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 25 Jun 2025 17:10:24 -0500 Subject: improve prompt cancellation The cancel button was overlaying the submit button preventing the submission of a prompt. Distinguish between cancelable and mandatory prompt. Only^ allow cancelable prompts to be removed. Fixes: 37acd982 --- go/client/keybindings.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'go/client/keybindings.go') diff --git a/go/client/keybindings.go b/go/client/keybindings.go index 2bfc52c7..ebc66c22 100644 --- a/go/client/keybindings.go +++ b/go/client/keybindings.go @@ -67,7 +67,9 @@ func selection(g *Game, x, y int) bool { if g.prompt != nil { if err := g.prompt.Add(obj); err != nil { log.Println("Not added", obj, "to active prompt:", err) - g.handleSelection(obj, x, y) + if g.prompt.Cancelable() { + g.handleSelection(obj, x, y) + } } else { g.updateHighlight() } -- cgit v1.2.3