Merge pull request #377 from sdburns1998/ground-items-config

Ground items config options
This commit is contained in:
Tyler Bochard
2019-05-23 05:10:39 -04:00
committed by GitHub
6 changed files with 360 additions and 228 deletions

View File

@@ -29,6 +29,7 @@ import java.awt.Color;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.Stub;
import net.runelite.client.plugins.grounditems.config.ItemHighlightMode;
import net.runelite.client.plugins.grounditems.config.MenuHighlightMode;
import net.runelite.client.plugins.grounditems.config.PriceDisplayMode;
@@ -38,11 +39,70 @@ import net.runelite.client.plugins.grounditems.config.ValueCalculationMode;
@ConfigGroup("grounditems")
public interface GroundItemsConfig extends Config
{
@ConfigItem(
keyName = "colorsStub",
name = "Colors",
description = "",
position = 1
)
default Stub colorsStub()
{
return new Stub();
}
@ConfigItem(
keyName = "defaultColor",
name = "Default items",
description = "Configures the color for default, non-highlighted items",
position = 2,
parent = "colorsStub"
)
default Color defaultColor()
{
return Color.WHITE;
}
@ConfigItem(
keyName = "highlightedColor",
name = "Highlighted items",
description = "Configures the color for highlighted items",
position = 3,
parent = "colorsStub"
)
default Color highlightedColor()
{
return Color.decode("#AA00FF");
}
@ConfigItem(
keyName = "hiddenColor",
name = "Hidden items",
description = "Configures the color for hidden items in right-click menu and when holding ALT",
position = 4,
parent = "colorsStub"
)
default Color hiddenColor()
{
return Color.GRAY;
}
@ConfigItem(
keyName = "highlightedStub",
name = "Highlighted",
description = "",
position = 5
)
default Stub highlightedStub()
{
return new Stub();
}
@ConfigItem(
keyName = "highlightedItems",
name = "Highlighted Items",
description = "Configures specifically highlighted ground items. Format: (item), (item)",
position = 0
position = 6,
parent = "highlightedStub"
)
default String getHighlightItems()
{
@@ -56,128 +116,24 @@ public interface GroundItemsConfig extends Config
)
void setHighlightedItem(String key);
@ConfigItem(
keyName = "hiddenItems",
name = "Hidden Items",
description = "Configures hidden ground items. Format: (item), (item)",
position = 1
)
default String getHiddenItems()
{
return "Vial, Ashes, Coins, Bones, Bucket, Jug, Seaweed";
}
@ConfigItem(
keyName = "hiddenItems",
name = "",
description = ""
)
void setHiddenItems(String key);
@ConfigItem(
keyName = "showHighlightedOnly",
name = "Show Highlighted items only",
description = "Configures whether or not to draw items only on your highlighted list",
position = 2
position = 7,
parent = "highlightedStub"
)
default boolean showHighlightedOnly()
{
return false;
}
@ConfigItem(
keyName = "dontHideUntradeables",
name = "Do not hide untradeables",
description = "Configures whether or not untradeable items ignore hiding under settings",
position = 3
)
default boolean dontHideUntradeables()
{
return true;
}
@ConfigItem(
keyName = "showMenuItemQuantities",
name = "Show Menu Item Quantities",
description = "Configures whether or not to show the item quantities in the menu",
position = 4
)
default boolean showMenuItemQuantities()
{
return true;
}
@ConfigItem(
keyName = "recolorMenuHiddenItems",
name = "Recolor Menu Hidden Items",
description = "Configures whether or not hidden items in right click menu will be recolored",
position = 5
)
default boolean recolorMenuHiddenItems()
{
return false;
}
@ConfigItem(
keyName = "highlightTiles",
name = "Highlight Tiles",
description = "Configures whether or not to highlight tiles containing ground items",
position = 6
)
default boolean highlightTiles()
{
return false;
}
@ConfigItem(
keyName = "notifyHighlightedDrops",
name = "Notify for Highlighted drops",
description = "Configures whether or not to notify for drops on your highlighted list",
position = 7
)
default boolean notifyHighlightedDrops()
{
return false;
}
@ConfigItem(
keyName = "priceDisplayMode",
name = "Price Display Mode",
description = "Configures what price types are shown alongside of ground item name",
position = 8
)
default PriceDisplayMode priceDisplayMode()
{
return PriceDisplayMode.BOTH;
}
@ConfigItem(
keyName = "itemHighlightMode",
name = "Item Highlight Mode",
description = "Configures how ground items will be highlighted",
position = 9
)
default ItemHighlightMode itemHighlightMode()
{
return ItemHighlightMode.BOTH;
}
@ConfigItem(
keyName = "menuHighlightMode",
name = "Menu Highlight Mode",
description = "Configures what to highlight in right-click menu",
position = 10
)
default MenuHighlightMode menuHighlightMode()
{
return MenuHighlightMode.NAME;
}
@ConfigItem(
keyName = "highlightValueCalculation",
name = "Highlight Value Calculation",
name = "Highlighted Value Calculation",
description = "Configures which coin value is used to determine highlight color",
position = 11
position = 8,
parent = "highlightedStub"
)
default ValueCalculationMode valueCalculationMode()
{
@@ -188,18 +144,87 @@ public interface GroundItemsConfig extends Config
keyName = "highlightOverValue2",
name = "Highlight > Value",
description = "Configures highlighted ground items over either GE or HA value",
position = 12
position = 9,
parent = "highlightedStub"
)
default int getHighlightOverValue()
{
return 0;
}
@ConfigItem(
keyName = "notifyHighlightedDrops",
name = "Notify for Highlighted drops",
description = "Configures whether or not to notify for drops on your highlighted list",
position = 10,
parent = "highlightStub"
)
default boolean notifyHighlightedDrops()
{
return false;
}
@ConfigItem(
keyName = "hiddenStub",
name = "Hidden",
description = "",
position = 11
)
default Stub hiddenStub()
{
return new Stub();
}
@ConfigItem(
keyName = "dontHideUntradeables",
name = "Do not hide untradeables",
description = "Configures whether or not untradeable items ignore hiding under settings",
position = 12,
parent = "hiddenStub"
)
default boolean dontHideUntradeables()
{
return true;
}
@ConfigItem(
keyName = "hiddenItems",
name = "Hidden Items",
description = "Configures hidden ground items. Format: (item), (item)",
position = 13,
parent = "hiddenStub"
)
default String getHiddenItems()
{
return "Vial, Ashes, Coins, Bones, Bucket, Jug, Seaweed";
}
@ConfigItem(
keyName = "hiddenItems",
name = "",
description = "",
parent = "hiddenStub"
)
void setHiddenItems(String key);
@ConfigItem(
keyName = "recolorMenuHiddenItems",
name = "Recolor Menu Hidden Items",
description = "Configures whether or not hidden items in right click menu will be recolored",
position = 14,
parent = "hiddenStub"
)
default boolean recolorMenuHiddenItems()
{
return false;
}
@ConfigItem(
keyName = "hideUnderValue",
name = "Hide < Value",
description = "Configures hidden ground items under both GE and HA value",
position = 13
position = 15,
parent = "hiddenStub"
)
default int getHideUnderValue()
{
@@ -207,43 +232,92 @@ public interface GroundItemsConfig extends Config
}
@ConfigItem(
keyName = "defaultColor",
name = "Default items color",
description = "Configures the color for default, non-highlighted items",
position = 14
keyName = "removeIgnored",
name = "Hide Hidden",
description = "Remove take option for items that are on the hidden items list.",
position = 16,
parent = "hiddenStub"
)
default Color defaultColor()
default boolean removeIgnored()
{
return Color.WHITE;
return false;
}
@ConfigItem(
keyName = "highlightedColor",
name = "Highlighted items color",
description = "Configures the color for highlighted items",
position = 15
keyName = "rightClickHidden",
name = "Right click hidden items",
description = "Places hidden items below the 'Walk here' option, making it so that you need to right click to pick them up",
position = 17,
parent = "hiddenStub"
)
default Color highlightedColor()
default boolean rightClickHidden()
{
return Color.decode("#AA00FF");
return false;
}
@ConfigItem(
keyName = "hiddenColor",
name = "Hidden items color",
description = "Configures the color for hidden items in right-click menu and when holding ALT",
position = 16
keyName = "highlightStub",
name = "Highlight",
description = "",
position = 18
)
default Color hiddenColor()
default Stub highlightStub()
{
return Color.GRAY;
return new Stub();
}
@ConfigItem(
keyName = "highlightTiles",
name = "Highlight Tiles",
description = "Configures whether or not to highlight tiles containing ground items",
position = 19,
parent = "highlightStub"
)
default boolean highlightTiles()
{
return false;
}
@ConfigItem(
keyName = "itemHighlightMode",
name = "Item Highlight Mode",
description = "Configures how ground items will be highlighted",
position = 20,
parent = "highlightStub"
)
default ItemHighlightMode itemHighlightMode()
{
return ItemHighlightMode.BOTH;
}
@ConfigItem(
keyName = "menuHighlightMode",
name = "Menu Highlight Mode",
description = "Configures what to highlight in right-click menu",
position = 21,
parent = "highlightStub"
)
default MenuHighlightMode menuHighlightMode()
{
return MenuHighlightMode.NAME;
}
@ConfigItem(
keyName = "lowValueStub",
name = "Low value",
description = "",
position = 22
)
default Stub lowValueStub()
{
return new Stub();
}
@ConfigItem(
keyName = "lowValueColor",
name = "Low value items color",
name = "Low value color",
description = "Configures the color for low value items",
position = 17
position = 23,
parent = "lowValueStub"
)
default Color lowValueColor()
{
@@ -254,7 +328,8 @@ public interface GroundItemsConfig extends Config
keyName = "lowValuePrice",
name = "Low value price",
description = "Configures the start price for low value items",
position = 18
position = 24,
parent = "lowValueStub"
)
default int lowValuePrice()
{
@@ -265,18 +340,31 @@ public interface GroundItemsConfig extends Config
keyName = "notifyLowValueDrops",
name = "Notify for low value drops",
description = "Configures whether or not to notify for drops of low value",
position = 19
position = 25,
parent = "lowValueStub"
)
default boolean notifyLowValueDrops()
{
return false;
}
@ConfigItem(
keyName = "mediumValueStub",
name = "Medium value",
description = "",
position = 26
)
default Stub mediumValueStub()
{
return new Stub();
}
@ConfigItem(
keyName = "mediumValueColor",
name = "Medium value items color",
name = "Medium value color",
description = "Configures the color for medium value items",
position = 20
position = 27,
parent = "mediumValueStub"
)
default Color mediumValueColor()
{
@@ -287,7 +375,8 @@ public interface GroundItemsConfig extends Config
keyName = "mediumValuePrice",
name = "Medium value price",
description = "Configures the start price for medium value items",
position = 21
position = 28,
parent = "mediumValueStub"
)
default int mediumValuePrice()
{
@@ -298,18 +387,31 @@ public interface GroundItemsConfig extends Config
keyName = "notifyMediumValueDrops",
name = "Notify for medium value drops",
description = "Configures whether or not to notify for drops of medium value",
position = 22
position = 29,
parent = "mediumValueStub"
)
default boolean notifyMediumValueDrops()
{
return false;
}
@ConfigItem(
keyName = "highValueStub",
name = "High value",
description = "",
position = 30
)
default Stub highValueStub()
{
return new Stub();
}
@ConfigItem(
keyName = "highValueColor",
name = "High value items color",
name = "High value color",
description = "Configures the color for high value items",
position = 23
position = 31,
parent = "highValueStub"
)
default Color highValueColor()
{
@@ -320,7 +422,8 @@ public interface GroundItemsConfig extends Config
keyName = "highValuePrice",
name = "High value price",
description = "Configures the start price for high value items",
position = 24
position = 32,
parent = "highValueStub"
)
default int highValuePrice()
{
@@ -331,18 +434,31 @@ public interface GroundItemsConfig extends Config
keyName = "notifyHighValueDrops",
name = "Notify for high value drops",
description = "Configures whether or not to notify for drops of high value",
position = 25
position = 33,
parent = "highValueStub"
)
default boolean notifyHighValueDrops()
{
return false;
}
@ConfigItem(
keyName = "insaneValueStub",
name = "Insane value",
description = "",
position = 34
)
default Stub insaneValueStub()
{
return new Stub();
}
@ConfigItem(
keyName = "insaneValueColor",
name = "Insane value items color",
description = "Configures the color for insane value items",
position = 26
position = 35,
parent = "insaneValueStub"
)
default Color insaneValueColor()
{
@@ -353,7 +469,8 @@ public interface GroundItemsConfig extends Config
keyName = "insaneValuePrice",
name = "Insane value price",
description = "Configures the start price for insane value items",
position = 27
position = 36,
parent = "insaneValueStub"
)
default int insaneValuePrice()
{
@@ -364,73 +481,102 @@ public interface GroundItemsConfig extends Config
keyName = "notifyInsaneValueDrops",
name = "Notify for insane value drops",
description = "Configures whether or not to notify for drops of insane value",
position = 28
position = 37,
parent = "insaneValueStub"
)
default boolean notifyInsaneValueDrops()
{
return false;
}
@ConfigItem(
keyName = "priceStub",
name = "Price",
description = "",
position = 38
)
default Stub priceStub()
{
return new Stub();
}
@ConfigItem(
keyName = "priceDisplayMode",
name = "Price Display Mode",
description = "Configures what price types are shown alongside of ground item name",
position = 39,
parent = "priceStub"
)
default PriceDisplayMode priceDisplayMode()
{
return PriceDisplayMode.BOTH;
}
@ConfigItem(
keyName = "sortByGEPrice",
name = "Sort by GE price",
description = "Sorts ground items by GE price, instead of alch value",
position = 40,
parent = "priceStub"
)
default boolean sortByGEPrice()
{
return false;
}
@ConfigItem(
keyName = "miscStub",
name = "Miscellaneous",
description = "",
position = 41
)
default Stub miscStub()
{
return new Stub();
}
@ConfigItem(
keyName = "showMenuItemQuantities",
name = "Show Menu Item Quantities",
description = "Configures whether or not to show the item quantities in the menu",
position = 42,
parent = "miscStub"
)
default boolean showMenuItemQuantities()
{
return true;
}
@ConfigItem(
keyName = "collapseEntries",
name = "Collapse ground item menu entries",
description = "Collapses ground item menu entries together and appends count",
position = 43,
parent = "miscStub"
)
default boolean collapseEntries()
{
return false;
}
@ConfigItem(
keyName = "onlyShowLoot",
name = "Only show loot",
description = "Only shows drops from NPCs and players",
position = 29
position = 44,
parent = "miscStub"
)
default boolean onlyShowLoot()
{
return false;
}
@ConfigItem(
keyName = "doubleTapDelay",
name = "Delay for double-tap ALT to hide",
description = "Decrease this number if you accidentally hide ground items often. (0 = Disabled)",
position = 30
)
default int doubleTapDelay()
{
return 250;
}
@ConfigItem(
keyName = "collapseEntries",
name = "Collapse ground item menu entries",
description = "Collapses ground item menu entries together and appends count",
position = 31
)
default boolean collapseEntries()
{
return false;
}
@ConfigItem(
keyName = "removeIgnored",
name = "Hide Ignored",
description = "Remove take option for items that are on the hidden items list.",
position = 32
)
default boolean removeIgnored()
{
return false;
}
@ConfigItem(
keyName = "toggleOutline",
name = "Text Outline",
description = "Use an outline around text instead of a text shadow",
position = 33
)
default boolean toggleOutline()
{
return false;
}
@ConfigItem(
keyName = "showGroundItemDuration",
name = "Show time remaining",
description = "Turn on a countdown timer to show how long an item will remain on the ground",
position = 34
position = 45,
parent = "miscStub"
)
default TimerDisplayMode showGroundItemDuration()
{
@@ -438,23 +584,25 @@ public interface GroundItemsConfig extends Config
}
@ConfigItem(
keyName = "sortByGEPrice",
name = "Sort by GE price",
description = "Sorts ground items by GE price, instead of alch value",
position = 35
keyName = "doubleTapDelay",
name = "Delay for double-tap ALT to hide",
description = "Decrease this number if you accidentally hide ground items often. (0 = Disabled)",
position = 46,
parent = "miscStub"
)
default boolean sortByGEPrice()
default int doubleTapDelay()
{
return false;
return 250;
}
@ConfigItem(
keyName = "rightClickHidden",
name = "Right click hidden items",
description = "Places hidden items below the 'Walk here' option, making it so that you need to right click to pick them up",
position = 36
keyName = "toggleOutline",
name = "Text Outline",
description = "Use an outline around text instead of a text shadow",
position = 47,
parent = "miscStub"
)
default boolean rightClickHidden()
default boolean toggleOutline()
{
return false;
}

View File

@@ -32,7 +32,7 @@ import lombok.RequiredArgsConstructor;
public enum ItemHighlightMode
{
OVERLAY("Overlay"),
MENU("Right-click menu"),
MENU("Right-click"),
BOTH("Both");
private final String name;

View File

@@ -32,7 +32,7 @@ import lombok.RequiredArgsConstructor;
public enum MenuHighlightMode
{
OPTION("Menu option"),
NAME("Menu item name"),
NAME("Menu item"),
BOTH("Both");
private final String name;

View File

@@ -31,16 +31,8 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public enum PriceDisplayMode
{
HA("High Alchemy"),
GE("Grand Exchange"),
BOTH("Both"),
OFF("Off");
private final String name;
@Override
public String toString()
{
return name;
}
HA,
GE,
BOTH,
OFF;
}

View File

@@ -32,7 +32,7 @@ import lombok.RequiredArgsConstructor;
public enum TimerDisplayMode
{
ALWAYS("Always"),
HOTKEY_PRESSED("When Hotkey Pressed"),
HOTKEY_PRESSED("Hotkey"),
NEVER("Never");
private final String name;

View File

@@ -32,15 +32,7 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public enum ValueCalculationMode
{
HA("High Alchemy"), // calc highlight by HA value
GE("Grand Exchange"), // calc by GE
HIGHEST("Highest"); // use whatever is highest.
private final String name;
@Override
public String toString()
{
return name;
}
HA, // calc highlight by HA value
GE, // calc by GE
HIGHEST;
}