From fd09843bb69f2cd930ae11082e33dd8a609af855 Mon Sep 17 00:00:00 2001 From: Magic fTail Date: Thu, 19 Jul 2018 17:05:03 +0200 Subject: [PATCH] bank value plugin: add option to display exact value --- .../client/plugins/bankvalue/BankTitle.java | 22 +++++++++++++++++-- .../plugins/bankvalue/BankValueConfig.java | 19 ++++++++++++++-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/bankvalue/BankTitle.java b/runelite-client/src/main/java/net/runelite/client/plugins/bankvalue/BankTitle.java index 48e509c508..c9fe44bcd8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/bankvalue/BankTitle.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/bankvalue/BankTitle.java @@ -92,12 +92,30 @@ class BankTitle if (config.showGE() && gePrice != 0) { - strCurrentTab += " (EX: " + StackFormatter.quantityToStackSize(gePrice) + ")"; + strCurrentTab += " (EX: "; + + if (config.showExact()) + { + strCurrentTab += StackFormatter.formatNumber(gePrice) + ")"; + } + else + { + strCurrentTab += StackFormatter.quantityToStackSize(gePrice) + ")"; + } } if (config.showHA() && haPrice != 0) { - strCurrentTab += " (HA: " + StackFormatter.quantityToStackSize(haPrice) + ")"; + strCurrentTab += " (HA: "; + + if (config.showExact()) + { + strCurrentTab += StackFormatter.formatNumber(haPrice) + ")"; + } + else + { + strCurrentTab += StackFormatter.quantityToStackSize(haPrice) + ")"; + } } log.debug("Setting bank title: {}", bankTitle + strCurrentTab); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/bankvalue/BankValueConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/bankvalue/BankValueConfig.java index c03557e2c4..e5fecf09a7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/bankvalue/BankValueConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/bankvalue/BankValueConfig.java @@ -35,7 +35,9 @@ public interface BankValueConfig extends Config @ConfigItem( keyName = "showGE", name = "Show Grand Exchange price", - description = "Show grand exchange price total (GE)") + description = "Show grand exchange price total (GE)", + position = 1 + ) default boolean showGE() { return true; @@ -44,9 +46,22 @@ public interface BankValueConfig extends Config @ConfigItem( keyName = "showHA", name = "Show high alchemy price", - description = "Show high alchemy price total (HA)") + description = "Show high alchemy price total (HA)", + position = 2 + ) default boolean showHA() { return false; } + + @ConfigItem( + keyName = "showExact", + name = "Show exact bank value", + description = "Show exact bank value", + position = 3 + ) + default boolean showExact() + { + return false; + } }