Add hover option to runepouch

This commit is contained in:
Seth
2018-01-24 21:29:18 -06:00
parent cedb7041c8
commit 0e8bb44989
2 changed files with 21 additions and 6 deletions

View File

@@ -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;
}
}

View File

@@ -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;