From 5272e2d9b696469d2933dc39294a790277c37622 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Tue, 20 Mar 2018 18:09:30 +0100 Subject: [PATCH] Color the hidden items gray when in highlight mode Color hidden ground items gray when in item highlight mode to show different between non-hidden and hidden items. Signed-off-by: Tomas Slusny --- .../client/plugins/grounditems/GroundItemsOverlay.java | 10 ++++++++-- .../client/plugins/grounditems/GroundItemsPlugin.java | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsOverlay.java index 31b4b8fe63..a3405ebdab 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsOverlay.java @@ -118,7 +118,8 @@ public class GroundItemsOverlay extends Overlay } final boolean hidden = plugin.isHidden(item.getName()); - final Color color = getCostColor(item.getGePrice() > 0 ? item.getGePrice() : item.getHaPrice(), highlighted); + final Color color = getCostColor(item.getGePrice() > 0 ? item.getGePrice() : item.getHaPrice(), + highlighted, hidden); itemStringBuilder.append(item.getName()); if (item.getQuantity() > 1) @@ -208,8 +209,13 @@ public class GroundItemsOverlay extends Overlay return null; } - Color getCostColor(int cost, boolean highlighted) + Color getCostColor(int cost, boolean highlighted, boolean hidden) { + if (hidden) + { + return Color.GRAY; + } + if (highlighted) { return config.highlightedColor(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsPlugin.java index 839cdc476a..441bfb288b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsPlugin.java @@ -394,7 +394,8 @@ public class GroundItemsPlugin extends Plugin ItemPrice itemPrice = getItemPrice(itemComposition); int price = itemPrice == null ? itemComposition.getPrice() : itemPrice.getPrice(); int cost = quantity * price; - Color color = overlay.getCostColor(cost, isHighlighted(itemComposition.getName())); + Color color = overlay.getCostColor(cost, isHighlighted(itemComposition.getName()), + isHidden(itemComposition.getName())); if (!color.equals(config.defaultColor())) {