Merge pull request #5870 from Nightfirecat/dont-show-tooltips-for-world-map-dungeons

mouse tooltips: Don't add a tooltip if another is present
This commit is contained in:
Tomas Slusny
2018-10-08 10:31:44 +02:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@@ -36,6 +36,12 @@ public enum VarClientInt
{
TOOLTIP_TIMEOUT(1),
/**
* 0 = no tooltip displayed
* 1 = tooltip displaying
*/
TOOLTIP_VISIBLE(2),
MEMBERSHIP_STATUS(103),
WORLD_MAP_SEARCH_FOCUSED(190);

View File

@@ -118,6 +118,13 @@ class MouseHighlightOverlay extends Overlay
}
}
// If this varc is set, a tooltip is already being displayed
int tooltipDisplayed = client.getVar(VarClientInt.TOOLTIP_VISIBLE);
if (tooltipDisplayed == 1)
{
return null;
}
tooltipManager.addFront(new Tooltip(option + (Strings.isNullOrEmpty(target) ? "" : " " + target)));
return null;
}