From 90048fc6f0b3a843e13620288d2897187fa0e439 Mon Sep 17 00:00:00 2001 From: Damhan Richardson Date: Tue, 3 Sep 2019 18:26:47 +0100 Subject: [PATCH 1/3] playerindicators: fix agility icon when show cb level is turned on. --- .../playerindicators/PlayerIndicatorsOverlay.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java index 619bddfe9c..b7b4744084 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java @@ -160,7 +160,18 @@ public class PlayerIndicatorsOverlay extends Overlay if (plugin.getAgilityFormat() == PlayerIndicatorsPlugin.AgilityFormats.ICONS) { - final int width = graphics.getFontMetrics().stringWidth(name); + + + final int width; + if (plugin.isShowCombatLevel()) + { + width = graphics.getFontMetrics().stringWidth(name) + 10; + } + else + { + width = graphics.getFontMetrics().stringWidth(name); + + } final int height = graphics.getFontMetrics().getHeight(); if (level >= plugin.getAgilityFirstThreshold()) { From 0d036bb31fee0dae69b05474aa3e89788d16cab5 Mon Sep 17 00:00:00 2001 From: Damhan Richardson Date: Tue, 3 Sep 2019 18:29:08 +0100 Subject: [PATCH 2/3] playerindicators:fix agility icon --- .../client/plugins/playerindicators/PlayerIndicatorsOverlay.java | 1 - 1 file changed, 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java index b7b4744084..7fb7b0cb52 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java @@ -161,7 +161,6 @@ public class PlayerIndicatorsOverlay extends Overlay if (plugin.getAgilityFormat() == PlayerIndicatorsPlugin.AgilityFormats.ICONS) { - final int width; if (plugin.isShowCombatLevel()) { From 6034f6a12d6cffe50fed53c2ba420a7467ee0445 Mon Sep 17 00:00:00 2001 From: ST0NEWALL <46624825+pklite@users.noreply.github.com> Date: Wed, 4 Sep 2019 22:39:24 -0400 Subject: [PATCH 3/3] Update PlayerIndicatorsOverlay.java --- .../playerindicators/PlayerIndicatorsOverlay.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java index 7fb7b0cb52..96899bbb76 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsOverlay.java @@ -161,16 +161,9 @@ public class PlayerIndicatorsOverlay extends Overlay if (plugin.getAgilityFormat() == PlayerIndicatorsPlugin.AgilityFormats.ICONS) { - final int width; - if (plugin.isShowCombatLevel()) - { - width = graphics.getFontMetrics().stringWidth(name) + 10; - } - else - { - width = graphics.getFontMetrics().stringWidth(name); + final int width = plugin.isShowCombatLevel() ? graphics.getFontMetrics().stringWidth(name) + + ACTOR_HORIZONTAL_TEXT_MARGIN : graphics.getFontMetrics().stringWidth(name); - } final int height = graphics.getFontMetrics().getHeight(); if (level >= plugin.getAgilityFirstThreshold()) {