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:
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user