aboutsummaryrefslogtreecommitdiff
path: root/go/ui/textBox.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-04 18:51:31 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:47 +0100
commite9070ef3752c5d2ab1f9faac48095995772ce726 (patch)
treed1842db95e73039224476d0a5794d951e3fdfb3b /go/ui/textBox.go
parentea54efacae089aa3644cfe00c8e180d5cc2c8d9e (diff)
downloadmuhqs-game-e9070ef3752c5d2ab1f9faac48095995772ce726.tar.gz
muhqs-game-e9070ef3752c5d2ab1f9faac48095995772ce726.zip
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
Diffstat (limited to 'go/ui/textBox.go')
-rw-r--r--go/ui/textBox.go7
1 files changed, 7 insertions, 0 deletions
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)
}