diff --git a/terrainrenderer.go b/terrainrenderer.go index 510cfdd..7e0bb73 100644 --- a/terrainrenderer.go +++ b/terrainrenderer.go @@ -107,39 +107,45 @@ func (r *terrainRenderer) Handle(ctx ui.Context, event ui.Event) bool { } } - if r.hover != nil && r.game.Tool().Type() == "plant-flower" { - terrain := r.game.Terrain - temp := func() string { - temp := terrain.Temp.Value(r.hover.X, r.hover.Y) - switch { - case temp < .3: - return "very cold" - case temp < .4: - return "cold" - case temp > .7: - return "very hot" - case temp > .6: - return "hot" - default: - return "moderate" - } - }() - humid := func() string { - humid := terrain.Humid.Value(r.hover.X, r.hover.Y) - switch { - case humid < .3: - return " and very arid" - case humid < .4: - return " and arid" - case humid > .7: - return " and very damp" - case humid > .6: - return " and damp" - default: - return "" - } - }() - ctx.ShowTooltip(fmt.Sprintf("It is %s%s over here", temp, humid)) + tool := r.game.Tool().Type() + if r.hover != nil { + if tool != "none" { + ctx.Renderer().SetMouseCursor(ui.MouseCursorPointer) + } + if tool == "plant-flower" { + terrain := r.game.Terrain + temp := func() string { + temp := terrain.Temp.Value(r.hover.X, r.hover.Y) + switch { + case temp < .3: + return "very cold" + case temp < .4: + return "cold" + case temp > .7: + return "very hot" + case temp > .6: + return "hot" + default: + return "moderate" + } + }() + humid := func() string { + humid := terrain.Humid.Value(r.hover.X, r.hover.Y) + switch { + case humid < .3: + return " and very arid" + case humid < .4: + return " and arid" + case humid > .7: + return " and very damp" + case humid > .6: + return " and damp" + default: + return "" + } + }() + ctx.ShowTooltip(fmt.Sprintf("It is %s%s over here", temp, humid)) + } } return false }