Merge pull request #430 from Sethtroll/addhoverpouch
Add hover only option to Runepouch plugin
This commit is contained in:
@@ -65,4 +65,14 @@ public interface RunepouchConfig extends Config
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showOnlyOnHover",
|
||||
name = "Show only on hover",
|
||||
description = "Show the runes only when hovered"
|
||||
)
|
||||
default boolean showOnlyOnHover()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +112,17 @@ public class RunepouchOverlay extends Overlay
|
||||
Varbits runeVarbit = RUNE_VARBITS[i];
|
||||
int runeId = client.getSetting(runeVarbit);
|
||||
|
||||
tooltipBuilder
|
||||
.append(amount)
|
||||
.append(" <col=ffff00>")
|
||||
.append(runeImageCache.getName(runeId))
|
||||
.append("</col></br>");
|
||||
|
||||
if (config.showOnlyOnHover())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
graphics.setColor(Color.black);
|
||||
graphics.drawString("" + formatNumber(amount), location.getX() + (config.showIcons() ? 13 : 1),
|
||||
location.getY() + 14 + graphics.getFontMetrics().getHeight() * i);
|
||||
@@ -120,12 +131,6 @@ public class RunepouchOverlay extends Overlay
|
||||
graphics.drawString("" + formatNumber(amount), location.getX() + (config.showIcons() ? 12 : 0),
|
||||
location.getY() + 13 + graphics.getFontMetrics().getHeight() * i);
|
||||
|
||||
tooltipBuilder
|
||||
.append(amount)
|
||||
.append(" <col=ffff00>")
|
||||
.append(runeImageCache.getName(runeId))
|
||||
.append("</col></br>");
|
||||
|
||||
if (!config.showIcons())
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user