From b0d2ca8ccb8b42d8da23ae014d154dfde9f1cf08 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 3 Sep 2025 15:00:05 +0200 Subject: special case the formatting of free and full actions in choice --- go/ui/choice.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'go/ui/choice.go') diff --git a/go/ui/choice.go b/go/ui/choice.go index 5954c1fa..80902606 100644 --- a/go/ui/choice.go +++ b/go/ui/choice.go @@ -32,7 +32,15 @@ func (c *Choice) setText() { c.Width, c.Height = -1, -1 t := "" for _, choice := range c.choices { - t = fmt.Sprintf("%s%v\n", t, choice) + switch c := choice.(type) { + // Special case Free and FullActions + case *game.FreeAction: + t = fmt.Sprintf("%s%v\n", t, c.Desc) + case *game.FullAction: + t = fmt.Sprintf("%s↻%v\n", t, c.Desc) + default: + t = fmt.Sprintf("%s%v\n", t, choice) + } } c.text = t[:len(t)-1] -- cgit v1.2.3