client: add right click only tooltips toggle

A toggle for right-click-only option tooltips has been added to MouseHighlightConfig

Fixed #7770
This commit is contained in:
Andrew Fulton
2019-02-10 16:30:50 -06:00
parent 55395b6708
commit 8bcc60fd53
2 changed files with 14 additions and 1 deletions

View File

@@ -52,4 +52,12 @@ public interface MouseHighlightConfig extends Config
{
return true;
}
@ConfigItem(
position = 2,
keyName = "rightclickoptionTooltip",
name = "Right Click Option Tooltips",
description = "Whether or not tooltips are shown for options that right-click only."
)
default boolean isRightClickTooltipEnabled() { return false; }
}

View File

@@ -75,7 +75,7 @@ class MouseHighlightOverlay extends Overlay
String option = menuEntry.getOption();
int type = menuEntry.getType();
if (type == MenuAction.RUNELITE_OVERLAY.getId() || type == MenuAction.EXAMINE_ITEM_BANK_EQ.getId())
if (!config.isRightClickTooltipEnabled() && isMenuActionRightClickOnly(type))
{
// These are always right click only
return null;
@@ -136,4 +136,9 @@ class MouseHighlightOverlay extends Overlay
tooltipManager.addFront(new Tooltip(option + (Strings.isNullOrEmpty(target) ? "" : " " + target)));
return null;
}
private boolean isMenuActionRightClickOnly(int type) {
return type == MenuAction.RUNELITE_OVERLAY.getId()
|| type == MenuAction.EXAMINE_ITEM_BANK_EQ.getId();
}
}