diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-04 18:51:31 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:46:40 +0200 |
| commit | 8c3456f5a120a00f8a4e89065d7d50f2c1b4ad0d (patch) | |
| tree | 6e201152c264184bcd5aad784386654e921c8634 /go/ui/textBox.go | |
| parent | 083ec284a9ef286729e544df9340a12760f03ab7 (diff) | |
| download | muhqs-game-8c3456f5a120a00f8a4e89065d7d50f2c1b4ad0d.tar.gz muhqs-game-8c3456f5a120a00f8a4e89065d7d50f2c1b4ad0d.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.go | 7 |
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) } |
