aboutsummaryrefslogtreecommitdiff
path: root/go/ui/mapView.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/ui/mapView.go')
-rw-r--r--go/ui/mapView.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/go/ui/mapView.go b/go/ui/mapView.go
index d73f3573..36455d8c 100644
--- a/go/ui/mapView.go
+++ b/go/ui/mapView.go
@@ -48,7 +48,7 @@ type MapView struct {
permanentsHighlights map[game.Permanent][]color.Color
}
-func NewMapView(g game.State) *MapView {
+func NewMapView(g game.State, c *Collection) *MapView {
vw := &MapView{
EventHandlersMap: NewEventHandlersMap(),
gameState: g,
@@ -56,7 +56,8 @@ func NewMapView(g game.State) *MapView {
tileHighlights: make(map[game.Position][]color.Color),
permanentsHighlights: make(map[game.Permanent][]color.Color),
}
- vw.hoverPermInfo.init(vw)
+ vw.hoverPermInfo.init(vw, c)
+ vw.RegisterHandler("hover", vw.hoverPermInfo.Hover)
return vw
}