diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-09-05 18:32:36 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-09-05 18:33:35 +0200 |
| commit | 60639e7a83bf4f22c3a3ccfab56921b88ff81c4f (patch) | |
| tree | 6b87014b368928e8be56981e47d4b6a5229e6b2a /go/ui/mapView.go | |
| parent | 04476b3225158a244269a84f0dcf112cfd0ee05a (diff) | |
| download | muhqs-game-60639e7a83bf4f22c3a3ccfab56921b88ff81c4f.tar.gz muhqs-game-60639e7a83bf4f22c3a3ccfab56921b88ff81c4f.zip | |
only clear tile highlights added by the hover perm info on HoverEnd
Diffstat (limited to 'go/ui/mapView.go')
| -rw-r--r-- | go/ui/mapView.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/go/ui/mapView.go b/go/ui/mapView.go index 035f0f35..169aaaf3 100644 --- a/go/ui/mapView.go +++ b/go/ui/mapView.go @@ -473,6 +473,13 @@ func (vw *MapView) AddHighlightTile(t *game.Tile, color color.Color) { vw.AddHighlightPosition(t.Position, color) } +// ClearTileHighlight removes a tile from the highlighted ones. +func (vw *MapView) ClearTileHighlight(t *game.Tile) { + delete(vw.tileHighlights, t.Position) + vw.ForceRedraw() +} + +// ClearTileHighlights removes all tile highlights. func (vw *MapView) ClearTileHighlights() { vw.HighlightTiles([]*game.Tile{}, nil) } |
