aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-24 13:42:39 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:51 +0100
commit375a764b9333817f8913527423faba024abfb996 (patch)
tree5b5c9bfee99662ed646bd0902282d7d387787967
parent8f11ebc2c028e2c5303b7acc5febe982290e60ec (diff)
downloadmuhqs-game-375a764b9333817f8913527423faba024abfb996.tar.gz
muhqs-game-375a764b9333817f8913527423faba024abfb996.zip
allow to exit any prompt on esc
-rw-r--r--go/client/game.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/go/client/game.go b/go/client/game.go
index 00047d5d..37e44d77 100644
--- a/go/client/game.go
+++ b/go/client/game.go
@@ -532,7 +532,11 @@ func (g *Game) Update() error {
g.hideStore()
g.RemoveWidget(g.discardPileView)
if g.prompt != nil {
- g.prompt.ClearSelections()
+ if g.prompt.Action().Targets().NoSelections() {
+ g.removePrompt()
+ } else {
+ g.prompt.ClearSelections()
+ }
}
}