diff options
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 8 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 792bbea4..6e3a2570 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -25,7 +25,6 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.commands.help.SettingsCommand; import io.github.moulberry.notenoughupdates.core.BackgroundBlur; -import io.github.moulberry.notenoughupdates.core.GuiScreenElementWrapper; import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingInteger; import io.github.moulberry.notenoughupdates.infopanes.DevInfoPane; import io.github.moulberry.notenoughupdates.infopanes.InfoPane; @@ -1212,6 +1211,13 @@ public class NEUOverlay extends Gui { NotEnoughUpdates.INSTANCE.config.ahGraph.graphEnabled) { NotEnoughUpdates.INSTANCE.openGui = new GuiPriceGraph(internalname.get()); return true; + } else if (keyPressed == NotEnoughUpdates.INSTANCE.config.misc.openAHKeybind) { + String cleanName = Utils.cleanColour(item.get("displayname").getAsString()); + if (NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo(internalname.get()) == null) { + NotEnoughUpdates.INSTANCE.trySendCommand("/ahs " + cleanName); + } else { + NotEnoughUpdates.INSTANCE.trySendCommand("/bz " + cleanName); + } } } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java index 95e29a5c..72521821 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java @@ -325,4 +325,12 @@ public class Misc { ) @ConfigEditorBoolean public boolean defaultArmorColour = false; + + @Expose + @ConfigOption( + name = "Search AH/BZ for current item", + desc = "Search AH/BZ for the item you are hovering over" + ) + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_M) + public int openAHKeybind = Keyboard.KEY_M; } |