package ui import ( "github.com/hajimehoshi/ebiten/v2" "muhq.space/muhqs-game/go/game" ) type HandCard struct { C *game.Card } type HandView struct { CardGrid } func NewHandView(x, y, width, height int, h *game.Hand, bottomAligned bool) *HandView { hv := &HandView{CardGrid{ WidgetBase: NewWidgetBase(x, y, width, height), cards: h, rows: 1, scale: -1, }} hv.renderImpl = func() *ebiten.Image { return hv.render() } return hv } func (hv *HandView) FindObjectAt(x, y int) any { if obj := hv.CardGrid.FindObjectAt(x, y); obj != nil { return HandCard{obj.(*game.Card)} } return nil }