aboutsummaryrefslogtreecommitdiff
path: root/go/ui/textBox.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-09-03 13:10:15 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-09-03 13:10:15 +0200
commitada59f2f5b2c2be0999131fe98af985effb5829d (patch)
treeb5f4b1114794c551333489252c7e7fbb2b424f27 /go/ui/textBox.go
parent67faa0f3bf6fb047d19372c9b671a45887b99f6e (diff)
downloadmuhqs-game-ada59f2f5b2c2be0999131fe98af985effb5829d.tar.gz
muhqs-game-ada59f2f5b2c2be0999131fe98af985effb5829d.zip
show all store available store cards when prompting to buy a card
Diffstat (limited to 'go/ui/textBox.go')
-rw-r--r--go/ui/textBox.go10
1 files changed, 5 insertions, 5 deletions
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