aboutsummaryrefslogtreecommitdiff
path: root/draw.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-07-25 11:41:19 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-07-25 11:41:19 +0200
commit563b9ee704a14322ed4805896c4f8ca3fa5df03a (patch)
tree302580bbc98354d5286ffd19c12fd40729e4696f /draw.go
parent500df7635bf1b24f19bec5dede929389bb1b179c (diff)
feat: Selection with priority
Diffstat (limited to 'draw.go')
-rw-r--r--draw.go3
1 files changed, 2 insertions, 1 deletions
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)