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 <slusnucky@gmail.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user