aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Itemlist.java8
2 files changed, 22 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);
+ }
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Itemlist.java b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Itemlist.java
index a957da75..c6389c41 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Itemlist.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Itemlist.java
@@ -149,4 +149,12 @@ public class Itemlist {
runnableId = 21
)
public boolean alwaysShowMonsters = false;
+
+ @Expose
+ @ConfigOption(
+ name = "Webpage In Browser",
+ desc = "Open wiki pages in your web browser instead of rendering in the info pane in game."
+ )
+ @ConfigEditorBoolean
+ public boolean wikiInBrowser = false;
}