From 4506380dbb7981f5a5d4d9f5a7cc58d92e8d15e5 Mon Sep 17 00:00:00 2001 From: juander-ux <73304484+juander-ux@users.noreply.github.com> Date: Thu, 29 Oct 2020 14:59:07 +0100 Subject: [PATCH] d2player/game_controls: Fix health/mana globe text locking (#882) when you click on a either of the globes the values should appear above them. --- d2game/d2player/game_controls.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d2game/d2player/game_controls.go b/d2game/d2player/game_controls.go index 2af1215b..18075594 100644 --- a/d2game/d2player/game_controls.go +++ b/d2game/d2player/game_controls.go @@ -1348,7 +1348,7 @@ func (g *GameControls) renderHealthTooltip(target d2interface.Surface) { strPanelHealth := fmt.Sprintf(fmtHealth, healthCurr, healthMax) // Display current hp and mana stats hpGlobe or manaGlobe region is clicked - if !g.actionableRegions[hpGlobe].rect.IsInRect(mx, my) || g.hpStatsIsVisible { + if !(g.actionableRegions[hpGlobe].rect.IsInRect(mx, my) || g.hpStatsIsVisible) { return } @@ -1365,7 +1365,7 @@ func (g *GameControls) renderManaTooltip(target d2interface.Surface) { manaCurr, manaMax := g.hero.Stats.Mana, g.hero.Stats.MaxMana strPanelMana := fmt.Sprintf(fmtMana, manaCurr, manaMax) - if !g.actionableRegions[manaGlobe].rect.IsInRect(mx, my) || g.manaStatsIsVisible { + if !(g.actionableRegions[manaGlobe].rect.IsInRect(mx, my) || g.manaStatsIsVisible) { return }