diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/bank/BankConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/bank/BankConfig.java index 529f00b2d0..eea92e195d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/bank/BankConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/bank/BankConfig.java @@ -28,15 +28,50 @@ package net.runelite.client.plugins.bank; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigItem; +import net.runelite.client.config.ConfigSection; @ConfigGroup("bank") public interface BankConfig extends Config { + @ConfigSection( + name = "Show Values", + description = "", + position = 0, + keyName = "ValueSection" + ) + default boolean ValueSection() + { + return false; + } + + @ConfigSection( + name = "Disable Left Click", + description = "", + position = 1, + keyName = "DisableLClickSection" + ) + default boolean DisableLClickSection() + { + return false; + } + + @ConfigSection( + name = "Bank Pin", + description = "", + position = 2, + keyName = "BankPinSection" + ) + default boolean BankPinSection() + { + return false; + } + @ConfigItem( keyName = "showGE", name = "Show Grand Exchange price", description = "Show grand exchange price total (GE)", - position = 1 + position = 0, + section = "ValueSection" ) default boolean showGE() { @@ -47,7 +82,8 @@ public interface BankConfig extends Config keyName = "showHA", name = "Show high alchemy price", description = "Show high alchemy price total (HA)", - position = 2 + position = 2, + section = "ValueSection" ) default boolean showHA() { @@ -58,18 +94,32 @@ public interface BankConfig extends Config keyName = "showExact", name = "Show exact bank value", description = "Show exact bank value", - position = 3 + position = 3, + section = "ValueSection" ) default boolean showExact() { return false; } + @ConfigItem( + keyName = "seedVaultValue", + name = "Show seed vault value", + description = "Adds the total value of all seeds inside the seed vault to the title", + position = 4, + section = "ValueSection" + ) + default boolean seedVaultValue() + { + return true; + } + @ConfigItem( keyName = "rightClickBankInventory", name = "Disable left click bank inventory", description = "Configures whether the bank inventory button will bank your inventory on left click", - position = 4 + position = 0, + section = "DisableLClickSection" ) default boolean rightClickBankInventory() { @@ -80,7 +130,8 @@ public interface BankConfig extends Config keyName = "rightClickBankEquip", name = "Disable left click bank equipment", description = "Configures whether the bank equipment button will bank your equipment on left click", - position = 5 + position = 1, + section = "DisableLClickSection" ) default boolean rightClickBankEquip() { @@ -91,7 +142,8 @@ public interface BankConfig extends Config keyName = "rightClickBankLoot", name = "Disable left click bank looting bag", description = "Configures whether the bank looting bag button will bank your looting bag contents on left click", - position = 6 + position = 2, + section = "DisableLClickSection" ) default boolean rightClickBankLoot() { @@ -99,21 +151,59 @@ public interface BankConfig extends Config } @ConfigItem( - keyName = "seedVaultValue", - name = "Show seed vault value", - description = "Adds the total value of all seeds inside the seed vault to the title", - position = 7 + keyName = "rightClickSetPlaceholders", + name = "Disable left click set placeholders", + description = "Configures whether the set bank placeholder button will be on left click", + position = 3, + section = "DisableLClickSection" ) - default boolean seedVaultValue() + default boolean rightClickSetPlaceholders() { - return true; + return false; + } + + @ConfigItem( + keyName = "rightClickReleasePlaceholders", + name = "Disable left click release placeholder", + description = "Configures whether the release bank placeholder button will be on left click", + position = 4, + section = "DisableLClickSection" + ) + default boolean rightClickReleasePlaceholders() + { + return false; + } + + @ConfigItem( + keyName = "rightClickFillBankFiller", + name = "Disable left click fill bank fillers", + description = "Configures whether the fill bank fillers button will be on left click", + position = 5, + section = "DisableLClickSection" + ) + default boolean rightClickFillBankFiller() + { + return false; + } + + @ConfigItem( + keyName = "rightClickSearch", + name = "Disable left click search", + description = "Configures whether the search button will search on left click", + position = 6, + section = "DisableLClickSection" + ) + default boolean rightClickSearch() + { + return false; } @ConfigItem( keyName = "largePinNumbers", name = "Large bank pin numbers", description = "Enlarges and centers the numbers inside the bank pin buttons", - position = 8 + position = 0, + section = "BankPinSection" ) default boolean largePinNumbers() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/bank/BankPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/bank/BankPlugin.java index ff6d0e4408..8ef926a2f6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/bank/BankPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/bank/BankPlugin.java @@ -110,6 +110,12 @@ public class BankPlugin extends Plugin private static final String DEPOSIT_WORN = "Deposit worn items"; private static final String DEPOSIT_INVENTORY = "Deposit inventory"; private static final String DEPOSIT_LOOT = "Deposit loot"; + private static final String DISABLE = "Disable"; + private static final String ENABLE = "Enable"; + private static final String RELEASE_ALL_PLACEHOLDERS = "Release all placeholders"; + private static final String SEARCH = "Search"; + private static final String FILL = "Fill"; + private static final String SEED_VAULT_TITLE = "Seed Vault"; private static final int PIN_FONT_OFFSET = 5; @@ -143,13 +149,6 @@ public class BankPlugin extends Plugin private boolean largePinNumbers; private Multiset itemQuantities; // bank item quantities for bank value search private String searchString; - - @Provides - BankConfig getConfig(ConfigManager configManager) - { - return configManager.getConfig(BankConfig.class); - } - @Getter(AccessLevel.PACKAGE) private boolean showGE; @Getter(AccessLevel.PACKAGE) @@ -158,6 +157,17 @@ public class BankPlugin extends Plugin private boolean rightClickBankInventory; private boolean rightClickBankEquip; private boolean rightClickBankLoot; + private boolean seedVaultValue; + private boolean rightClickSetPlaceholders; + private boolean rightClickReleasePlaceholders; + private boolean rightClickSearch; + private boolean rightClickFillBankFiller; + + @Provides + BankConfig getConfig(ConfigManager configManager) + { + return configManager.getConfig(BankConfig.class); + } @Override protected void startUp() @@ -188,7 +198,12 @@ public class BankPlugin extends Plugin { if ((entry.getOption().equals(DEPOSIT_WORN) && this.rightClickBankEquip) || (entry.getOption().equals(DEPOSIT_INVENTORY) && this.rightClickBankInventory) - || (entry.getOption().equals(DEPOSIT_LOOT) && this.rightClickBankLoot)) + || (entry.getOption().equals(DEPOSIT_LOOT) && this.rightClickBankLoot) + || (entry.getOption().startsWith(DISABLE) && this.rightClickSetPlaceholders) + || (entry.getOption().startsWith(ENABLE) && this.rightClickSetPlaceholders) + || (entry.getOption().equals(RELEASE_ALL_PLACEHOLDERS) && this.rightClickReleasePlaceholders) + || (entry.getOption().equals(SEARCH) && this.rightClickSearch) + || (entry.getOption().equals(FILL) && this.rightClickFillBankFiller)) { event.setForceRightClick(true); return; @@ -201,7 +216,12 @@ public class BankPlugin extends Plugin { if ((event.getOption().equals(DEPOSIT_WORN) && this.rightClickBankEquip) || (event.getOption().equals(DEPOSIT_INVENTORY) && this.rightClickBankInventory) - || (event.getOption().equals(DEPOSIT_LOOT) && this.rightClickBankLoot)) + || (event.getOption().equals(DEPOSIT_LOOT) && this.rightClickBankLoot) + || (event.getOption().startsWith(DISABLE) && this.rightClickSetPlaceholders) + || (event.getOption().startsWith(ENABLE) && this.rightClickSetPlaceholders) + || (event.getOption().equals(RELEASE_ALL_PLACEHOLDERS) && this.rightClickReleasePlaceholders) + || (event.getOption().equals(SEARCH) && this.rightClickSearch) + || (event.getOption().equals(FILL) && this.rightClickFillBankFiller)) { forceRightClickFlag = true; } @@ -255,7 +275,7 @@ public class BankPlugin extends Plugin @Subscribe private void onWidgetLoaded(WidgetLoaded event) { - if (event.getGroupId() != WidgetID.SEED_VAULT_GROUP_ID || !config.seedVaultValue()) + if (event.getGroupId() != WidgetID.SEED_VAULT_GROUP_ID || !this.seedVaultValue) { return; } @@ -300,7 +320,7 @@ public class BankPlugin extends Plugin { itemQuantities = null; } - else if (containerId == InventoryID.SEED_VAULT.getId() && config.seedVaultValue()) + else if (containerId == InventoryID.SEED_VAULT.getId() && this.seedVaultValue) { updateSeedVaultTotal(); } @@ -312,7 +332,7 @@ public class BankPlugin extends Plugin final long haPrice = prices.getHighAlchPrice(); String strCurrentTab = ""; - if (config.showGE() && gePrice != 0) + if (this.showGE && gePrice != 0) { strCurrentTab += " ("; @@ -471,6 +491,11 @@ public class BankPlugin extends Plugin this.rightClickBankInventory = config.rightClickBankInventory(); this.rightClickBankEquip = config.rightClickBankEquip(); this.rightClickBankLoot = config.rightClickBankLoot(); + this.seedVaultValue = config.seedVaultValue(); + this.rightClickSetPlaceholders = config.rightClickSetPlaceholders(); + this.rightClickReleasePlaceholders = config.rightClickReleasePlaceholders(); + this.rightClickSearch = config.rightClickSearch(); + this.rightClickFillBankFiller = config.rightClickFillBankFiller(); } @VisibleForTesting @@ -567,4 +592,4 @@ public class BankPlugin extends Plugin } return set; } -} +} \ No newline at end of file