diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-10-09 07:06:47 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-10-09 07:06:47 +0200 |
| commit | 0a64a4bdb028449bc3852887b1f54f397e40cf90 (patch) | |
| tree | 470b07f333f0fa8fa47e9bf7b1fde90f7a1b1878 /selection.go | |
| parent | ad119e88258cf6add42c9570b7a2b7b591fd0b99 (diff) | |
refactor: Rename const
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) } } |
