ground items: Add toggle to show highlighted items only

This commit is contained in:
Seth
2018-02-17 15:47:46 -06:00
parent 3d0e723f44
commit 9a602174d7
2 changed files with 15 additions and 3 deletions

View File

@@ -147,4 +147,14 @@ public interface GroundItemsConfig extends Config
{ {
return Color.decode("#FF66B2"); return Color.decode("#FF66B2");
} }
@ConfigItem(
keyName = "showHighlightedOnly",
name = "Show Highlighted items only",
description = "Configures whether or not to draw items only on your highlighted list"
)
default boolean showHighlightedOnly()
{
return false;
}
} }

View File

@@ -154,7 +154,9 @@ public class GroundItemsOverlay extends Overlay
ItemComposition itemDefinition = itemManager.getItemComposition(itemId); ItemComposition itemDefinition = itemManager.getItemComposition(itemId);
Integer currentQuantity = items.get(itemId); Integer currentQuantity = items.get(itemId);
if (!hiddenItems.contains(itemDefinition.getName().toLowerCase()))
String itemName = itemDefinition.getName().toLowerCase();
if (config.showHighlightedOnly() ? highlightedItems.contains(itemName) : !hiddenItems.contains(itemName))
{ {
if (itemDefinition.getNote() != -1) if (itemDefinition.getNote() != -1)
{ {