diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-25 11:41:19 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-25 11:41:19 +0200 |
| commit | 563b9ee704a14322ed4805896c4f8ca3fa5df03a (patch) | |
| tree | 302580bbc98354d5286ffd19c12fd40729e4696f /draw.go | |
| parent | 500df7635bf1b24f19bec5dede929389bb1b179c (diff) | |
feat: Selection with priority
Diffstat (limited to 'draw.go')
| -rw-r--r-- | draw.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |
