diff options
| author | Obsidian <108832807+Obsidianninja11@users.noreply.github.com> | 2023-12-31 04:49:44 -0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-31 14:49:44 +0100 |
| commit | d6dd4cfa9e5e1d3f5f8b0142365404671b9647a9 (patch) | |
| tree | 4af610c71b7802c0fc3a17a42e3d99e4e79586f2 /src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | |
| parent | 13a1c03698716178822b81b4510e63908ce8e5dd (diff) | |
| download | notenoughupdates-d6dd4cfa9e5e1d3f5f8b0142365404671b9647a9.tar.gz notenoughupdates-d6dd4cfa9e5e1d3f5f8b0142365404671b9647a9.tar.bz2 notenoughupdates-d6dd4cfa9e5e1d3f5f8b0142365404671b9647a9.zip | |
Item list: Option to open wiki in browser (#990)
Option to open wiki in browser
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 691515b4..f89eae44 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -739,14 +739,20 @@ public class NEUOverlay extends Gui { } String internalname = item.get("internalname").getAsString(); String name = item.get("displayname").getAsString(); - displayInformationPane(new TextInfoPane( - this, - manager, - EnumChatFormatting.GRAY + "Loading", - EnumChatFormatting.GRAY + "Loading your requested information about " + name + EnumChatFormatting.GRAY + "." - )); - infoPaneLoadingJob = InfoPane.create(this, manager, infoType, name, internalname, infoText) - .thenAccept(this::displayInformationPane); + if (NotEnoughUpdates.INSTANCE.config.itemlist.wikiInBrowser) { + Utils.openUrl(infoText); + Utils.addChatMessage("§e[NEU] Opening webpage in browser."); + } + else { + displayInformationPane(new TextInfoPane( + this, + manager, + EnumChatFormatting.GRAY + "Loading", + EnumChatFormatting.GRAY + "Loading your requested information about " + name + EnumChatFormatting.GRAY + "." + )); + infoPaneLoadingJob = InfoPane.create(this, manager, infoType, name, internalname, infoText) + .thenAccept(this::displayInformationPane); + } } } |
