Merge pull request #602 from runelite-extended/righttooltips
Updated Mouse Highlight Plugin - Fixed right click tool tips
This commit is contained in:
@@ -85,4 +85,15 @@ public interface MouseHighlightConfig extends Config
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 5,
|
||||||
|
keyName = "rightclickoptionTooltip",
|
||||||
|
name = "Right Click Option Tooltips",
|
||||||
|
description = "Whether or not tooltips are shown for options that right-click only."
|
||||||
|
)
|
||||||
|
default boolean isRightClickTooltipEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,9 +75,8 @@ class MouseHighlightOverlay extends Overlay
|
|||||||
String option = menuEntry.getOption();
|
String option = menuEntry.getOption();
|
||||||
int type = menuEntry.getType();
|
int type = menuEntry.getType();
|
||||||
|
|
||||||
if (type == MenuAction.RUNELITE_OVERLAY.getId() || type == MenuAction.EXAMINE_ITEM_BANK_EQ.getId())
|
if (shouldNotRenderMenuAction(type))
|
||||||
{
|
{
|
||||||
// These are always right click only
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,4 +140,15 @@ class MouseHighlightOverlay extends Overlay
|
|||||||
tooltipManager.addFront(new Tooltip(option + (Strings.isNullOrEmpty(target) ? "" : " " + target)));
|
tooltipManager.addFront(new Tooltip(option + (Strings.isNullOrEmpty(target) ? "" : " " + target)));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean shouldNotRenderMenuAction(int type)
|
||||||
|
{
|
||||||
|
return type == MenuAction.RUNELITE_OVERLAY.getId()
|
||||||
|
|| (!config.isRightClickTooltipEnabled() && isMenuActionRightClickOnly(type));
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isMenuActionRightClickOnly(int type)
|
||||||
|
{
|
||||||
|
return type == MenuAction.EXAMINE_ITEM_BANK_EQ.getId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user