From 563b9ee704a14322ed4805896c4f8ca3fa5df03a Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 25 Jul 2025 11:41:19 +0200 Subject: feat: Selection with priority --- draw.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'draw.go') diff --git a/draw.go b/draw.go index ba4f651..528955e 100644 --- a/draw.go +++ b/draw.go @@ -2,6 +2,7 @@ package main import ( "age_of_empires/physics" + "age_of_empires/selection" "fmt" "image/color" @@ -19,7 +20,7 @@ func (e *Entity) Draw(g *Game, screen *ebiten.Image) { screen.DrawImage(e.Image.Value, op) if e.Selection.IsEnabled && e.Selection.Value.IsSelected { opt := &ebiten.DrawImageOptions{} - opt.GeoM.Translate(float64(e.Position.Value.X-SELECTION_HALO_WIDTH/2), float64(e.Position.Value.Y-SELECTION_HALO_WIDTH/2)) + opt.GeoM.Translate(float64(e.Position.Value.X-selection.HALO_WIDTH/2), float64(e.Position.Value.Y-selection.HALO_WIDTH/2)) screen.DrawImage(e.Selection.Value.Halo, opt) if e.ResourceSource.IsEnabled { resourceText := fmt.Sprintf("%d", e.ResourceSource.Value.Remaining) -- cgit v1.3