aboutsummaryrefslogtreecommitdiff
path: root/go/client
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-26 00:19:48 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:52 +0100
commitfe0cfc82c6cf3d3576de94e0f8b294761067af81 (patch)
tree0614d392bf60d684c1a07f261c48f632b4650393 /go/client
parentdb469da2704f703d15e81f5e44ba157c10a21e77 (diff)
downloadmuhqs-game-fe0cfc82c6cf3d3576de94e0f8b294761067af81.tar.gz
muhqs-game-fe0cfc82c6cf3d3576de94e0f8b294761067af81.zip
intermediate commit
* use names for pile perm choice * fix PocList hover segfault * prevent mysterius autogenerated playTargets segfault
Diffstat (limited to 'go/client')
-rw-r--r--go/client/game.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/go/client/game.go b/go/client/game.go
index bbfb6643..0e516815 100644
--- a/go/client/game.go
+++ b/go/client/game.go
@@ -206,9 +206,11 @@ func (g *Game) addPermActionChoice(perm game.Permanent, x, y int) {
}
perms := []game.Permanent{perm}
+ labels := []string{perm.Card().Name}
for _, p := range perm.Pile() {
if len(p.CurrentlyAvailActions()) > 0 {
perms = append(perms, p)
+ labels = append(labels, p.Card().Name)
}
}
@@ -219,7 +221,7 @@ func (g *Game) addPermActionChoice(perm game.Permanent, x, y int) {
p := perms[c.GetChoosen(x, y)]
g.addActionChoice(p, x, y)
}
- g.addChoice(ui.NewPermChoice(x, y, perms, onClick))
+ g.addChoice(ui.NewChoice(x, y, utils.TypedSliceToInterfaceSlice(labels), onClick))
} else {
g.selectedObject = perms[0]
g.addActionChoice(perms[0], x, y)