diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-06-25 17:10:24 -0500 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:21 +0200 |
| commit | 0f78406cde7890f3f9b16cd0ba55afac4c9065cf (patch) | |
| tree | 9d8cb7243f67660369fa2a80535c9172c3447726 /go/client/keybindings.go | |
| parent | 9a4b12e6d388bb14a3c1b6343197f63a362709f4 (diff) | |
| download | muhqs-game-0f78406cde7890f3f9b16cd0ba55afac4c9065cf.tar.gz muhqs-game-0f78406cde7890f3f9b16cd0ba55afac4c9065cf.zip | |
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
Diffstat (limited to 'go/client/keybindings.go')
| -rw-r--r-- | go/client/keybindings.go | 4 |
1 files changed, 3 insertions, 1 deletions
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() } |
