aboutsummaryrefslogtreecommitdiff
path: root/go/ui/cardGrid.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/ui/cardGrid.go')
-rw-r--r--go/ui/cardGrid.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/go/ui/cardGrid.go b/go/ui/cardGrid.go
index 59e25f2c..abe1d60b 100644
--- a/go/ui/cardGrid.go
+++ b/go/ui/cardGrid.go
@@ -98,6 +98,7 @@ func (w *CardGrid) render() *ebiten.Image {
op.GeoM.Translate(xOffset, yOffset)
if slices.Contains(w.highlights, card) {
+ log.Println("Highlighting card", card.Name)
op.ColorM.Scale(1, 0, 0, 0.5)
}
@@ -153,6 +154,8 @@ func (w *CardGrid) FindObjectAt(_x, _y int) interface{} {
func (w *CardGrid) setHighlights(cards []*game.Card) {
w.highlights = cards
+ // Reset the grid card count to force grid to be redrawn containing the highlights
+ w.gridCards = 0
w.ForceRedraw()
}