diff options
Diffstat (limited to 'selection.go')
| -rw-r--r-- | selection.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/selection.go b/selection.go index 23e98aa..e41fce3 100644 --- a/selection.go +++ b/selection.go @@ -5,7 +5,7 @@ import ( "golang.org/x/exp/slog" ) -const SELECTION_HALO_SIZE = 10 +const SELECTION_HALO_WIDTH = 10 type Selection struct { IsSelected bool @@ -39,7 +39,7 @@ func DrawSelection(screen *ebiten.Image, e *Entity) { if e.Image.IsEnabled && e.Position.IsEnabled && e.Selection.IsEnabled { if e.Selection.Value.IsSelected { opt := &ebiten.DrawImageOptions{} - opt.GeoM.Translate(float64(e.Position.Value.X-SELECTION_HALO_SIZE/2), float64(e.Position.Value.Y-SELECTION_HALO_SIZE/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) } } |
