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.
This commit is contained in:
juander-ux 2020-10-29 14:59:07 +01:00 committed by GitHub
parent b1058d6085
commit 4506380dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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
}