diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/BookPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/BookPanel.java index a82cee5814..6842b34e7d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/BookPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/BookPanel.java @@ -77,6 +77,14 @@ class BookPanel extends JPanel void setIsTarget(boolean target) { - location.setForeground(target ? Color.GREEN : Color.WHITE); + location.setForeground(target ? Color.GREEN : Color.ORANGE); + } + + void setIsHeld(boolean held) + { + if (held) + { + location.setForeground(Color.WHITE); + } } } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryPanel.java index 8480328c47..bf5cffb417 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/kourendlibrary/KourendLibraryPanel.java @@ -52,6 +52,7 @@ class KourendLibraryPanel extends PluginPanel private static final ImageIcon RESET_ICON; private static final ImageIcon RESET_HOVER_ICON; + private final KourendLibraryPlugin plugin; private final KourendLibraryConfig config; private final Library library; @@ -65,10 +66,11 @@ class KourendLibraryPanel extends PluginPanel } @Inject - KourendLibraryPanel(KourendLibraryConfig config, Library library) + KourendLibraryPanel(KourendLibraryPlugin plugin, KourendLibraryConfig config, Library library) { super(); + this.plugin = plugin; this.config = config; this.library = library; } @@ -117,7 +119,11 @@ class KourendLibraryPanel extends PluginPanel Book customerBook = library.getCustomerBook(); for (Map.Entry b : bookPanels.entrySet()) { - b.getValue().setIsTarget(customerBook == b.getKey()); + final Book book = b.getKey(); + final BookPanel panel = b.getValue(); + + panel.setIsTarget(customerBook == book); + panel.setIsHeld(plugin.doesPlayerContainBook(book)); } HashMap> bookLocations = new HashMap<>();