From 8c3456f5a120a00f8a4e89065d7d50f2c1b4ad0d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 4 Feb 2023 18:51:31 +0100 Subject: improve permanent pile support * Fix alot of bugs caused by permanents without tiles * Implement a permanent choice to select the permanents in a pile * Fix how pile hooks are called --- go/ui/textBox.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'go/ui/textBox.go') diff --git a/go/ui/textBox.go b/go/ui/textBox.go index d0afbd9b..58a3e679 100644 --- a/go/ui/textBox.go +++ b/go/ui/textBox.go @@ -66,6 +66,13 @@ func NewUnitInfo(x, y int, u *game.Unit) *TextBox { info = fmt.Sprintf("%s\nAttack: %s", info, u.Attack.String()) } + if len(u.Pile()) > 0 { + info = fmt.Sprintf("%s\nPile:", info) + for _, p := range u.Pile() { + info = fmt.Sprintf("%s\n %s", info, p.Card().Name) + } + } + return NewAutoTextBox(x, y, info) } -- cgit v1.2.3