diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-02-17 08:00:18 +0100 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-02-17 08:00:18 +0100 |
| commit | 8da30c8dd8cc0860768ff0e54f0d092ac94013fa (patch) | |
| tree | 603cf87fe5a7cc0efc68b61443f46c6aa2ff4ce0 /entity.go | |
| parent | f059ff3201599fed63302ac9e0ff315a05059922 (diff) | |
Selection is now Selectable
Diffstat (limited to 'entity.go')
| -rw-r--r-- | entity.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 } |
