From 8da30c8dd8cc0860768ff0e54f0d092ac94013fa Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Tue, 17 Feb 2026 08:00:18 +0100 Subject: Selection is now Selectable --- entity.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'entity.go') diff --git a/entity.go b/entity.go index 73aa118..40ca0ea 100644 --- a/entity.go +++ b/entity.go @@ -14,7 +14,7 @@ type Components struct { Position physics.Point RelBounds physics.Rectangle Image *ebiten.Image - Selection selection.Selection + Selectable selection.Selectable Move physics.Move Order OrderKind ResourceGatherer ResourceGatherer @@ -50,18 +50,18 @@ func (b EntityBuilder) WithSolid(image *ebiten.Image) EntityBuilder { var Red = color.RGBA{0xff, 0x00, 0x00, 0xff} -func (b EntityBuilder) WithSelection(haloKind string, priority selection.Priority) EntityBuilder { - b.components.Selection = selection.Selection{ +func (b EntityBuilder) WithSelectable(haloKind string, priority selection.Priority) EntityBuilder { + b.components.Selectable = selection.Selectable{ IsSelected: false, Halo: nil, Priority: priority, } - b.mask |= ecs.CM_Selection + b.mask |= ecs.CM_Selectable switch haloKind { case "round": - b.components.Selection.Halo = NewStrokeCircleImage(110, selection.HaloWidth, Red) + b.components.Selectable.Halo = NewStrokeCircleImage(110, selection.HaloWidth, Red) case "square": - b.components.Selection.Halo = NewStrokeRectangleImage(physics.Point{X: 110, Y: 110}, selection.HaloWidth, Red) + b.components.Selectable.Halo = NewStrokeRectangleImage(physics.Point{X: 110, Y: 110}, selection.HaloWidth, Red) } return b } -- cgit v1.3