From da12fbf5a19be6e8a438523506a489b87a37f96f Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 24 Feb 2023 13:42:00 +0100 Subject: do not draw the pass button multiple times --- 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 f4e0f817..00047d5d 100644 --- a/go/client/game.go +++ b/go/client/game.go @@ -340,7 +340,9 @@ func (g *Game) declareAction(a game.Action) { } func (g *Game) showPassButton() { - g.AddWidget(g.passButton) + if g.FindWidget(g.passButton) == -1 { + g.AddWidget(g.passButton) + } } func (g *Game) hidePassButton() { -- cgit v1.2.3