From fe0cfc82c6cf3d3576de94e0f8b294761067af81 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 26 Feb 2023 00:19:48 +0100 Subject: intermediate commit * use names for pile perm choice * fix PocList hover segfault * prevent mysterius autogenerated playTargets segfault --- go/client/game.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'go/client') 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) -- cgit v1.2.3