From ada59f2f5b2c2be0999131fe98af985effb5829d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 3 Sep 2025 13:10:15 +0200 Subject: show all store available store cards when prompting to buy a card --- go/ui/textBox.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'go/ui/textBox.go') diff --git a/go/ui/textBox.go b/go/ui/textBox.go index e2238078..1b0cae5e 100644 --- a/go/ui/textBox.go +++ b/go/ui/textBox.go @@ -141,7 +141,7 @@ type PocList struct { hoverCardView centerX int bottomY int - poc game.PileOfCards + Poc game.PileOfCards } func NewPocList(centerX, bottomY int, poc game.PileOfCards, c *Collection) *PocList { @@ -149,7 +149,7 @@ func NewPocList(centerX, bottomY int, poc game.PileOfCards, c *Collection) *PocL TextBox: *(NewAutoTextBox(-1, -1, "").Centering(true)), centerX: centerX, bottomY: bottomY, - poc: poc, + Poc: poc, } w.hoverCardView.init(w, c) @@ -165,7 +165,7 @@ func NewPocList(centerX, bottomY int, poc game.PileOfCards, c *Collection) *PocL func (w *PocList) setText() { w.Width, w.Height = -1, -1 t := "" - for _, c := range w.poc.Cards() { + for _, c := range w.Poc.Cards() { t = fmt.Sprintf("%s%s\n", t, c.Name) } @@ -185,7 +185,7 @@ func (w *PocList) FindObjectAt(_x, _y int) any { return nil } - cards := w.poc.Cards() + cards := w.Poc.Cards() if len(cards) == 0 { return nil } @@ -193,7 +193,7 @@ func (w *PocList) FindObjectAt(_x, _y int) any { y := _y - w.Y _, height := text.Measure(w.text, w.font, w.font.Size*w.lineSpacing) - i := y / (int(height) / w.poc.Size()) + i := y / (int(height) / w.Poc.Size()) if i >= len(cards) { return nil -- cgit v1.2.3