aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go2
-rw-r--r--selection.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 3f03210..8ed3133 100644
--- a/main.go
+++ b/main.go
@@ -191,7 +191,7 @@ func main() {
game.Entities = append(game.Entities, &storage)
var order Order
personImage := NewFilledCircleImage(100, color.RGBA{0xff, 0xff, 0xff, 0xff})
- personSelectionHalo := NewStrokeCircleImage(110, SELECTION_HALO_SIZE, color.RGBA{0xff, 0x00, 0x00, 0xff})
+ personSelectionHalo := NewStrokeCircleImage(110, SELECTION_HALO_WIDTH, color.RGBA{0xff, 0x00, 0x00, 0xff})
person1 := Entity{
Position: C(Point{2000, 2000}),
Image: C(personImage),
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)
}
}