diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLite.java b/runelite-client/src/main/java/net/runelite/client/RuneLite.java index f4626b10a0..862ddd2981 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuneLite.java +++ b/runelite-client/src/main/java/net/runelite/client/RuneLite.java @@ -88,8 +88,8 @@ public class RuneLite public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles"); public static final File PLUGIN_DIR = new File(RUNELITE_DIR, "plugins"); public static final File SCREENSHOT_DIR = new File(RUNELITE_DIR, "screenshots"); - static final RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen(); - + public static final File LOGS_DIR = new File(RUNELITE_DIR, "logs"); + private static final RuneLiteSplashScreen splashScreen = new RuneLiteSplashScreen(); @Getter private static Injector injector; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/info/InfoPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/info/InfoPanel.java index c3157b9b85..6b71f552a6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/info/InfoPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/info/InfoPanel.java @@ -30,10 +30,13 @@ import com.google.inject.Inject; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; +import java.awt.Desktop; import java.awt.Font; import java.awt.GridLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.io.File; +import java.io.IOException; import java.util.concurrent.ScheduledExecutorService; import javax.annotation.Nullable; import javax.inject.Singleton; @@ -45,6 +48,7 @@ import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.event.HyperlinkEvent; import net.runelite.api.Client; +import static net.runelite.client.RuneLite.LOGS_DIR; import net.runelite.client.RuneLiteProperties; import net.runelite.client.account.SessionManager; import net.runelite.client.config.ConfigManager; @@ -65,9 +69,9 @@ public class InfoPanel extends PluginPanel private static final ImageIcon ARROW_RIGHT_ICON; private static final ImageIcon GITHUB_ICON; + private static final ImageIcon FOLDER_ICON; private static final ImageIcon DISCORD_ICON; private static final ImageIcon PATREON_ICON; - private static final ImageIcon WIKI_ICON; private static final ImageIcon IMPORT_ICON; private final JLabel loggedLabel = new JLabel(); @@ -98,9 +102,9 @@ public class InfoPanel extends PluginPanel { ARROW_RIGHT_ICON = new ImageIcon(ImageUtil.getResourceStreamFromClass(InfoPanel.class, "/util/arrow_right.png")); GITHUB_ICON = new ImageIcon(ImageUtil.getResourceStreamFromClass(InfoPanel.class, "github_icon.png")); + FOLDER_ICON = new ImageIcon(ImageUtil.getResourceStreamFromClass(InfoPanel.class, "folder_icon.png")); DISCORD_ICON = new ImageIcon(ImageUtil.getResourceStreamFromClass(InfoPanel.class, "discord_icon.png")); PATREON_ICON = new ImageIcon(ImageUtil.getResourceStreamFromClass(InfoPanel.class, "patreon_icon.png")); - WIKI_ICON = new ImageIcon(ImageUtil.getResourceStreamFromClass(InfoPanel.class, "wiki_icon.png")); IMPORT_ICON = new ImageIcon(ImageUtil.getResourceStreamFromClass(InfoPanel.class, "import_icon.png")); } @@ -161,7 +165,7 @@ public class InfoPanel extends PluginPanel actionsContainer = new JPanel(); actionsContainer.setBorder(new EmptyBorder(10, 0, 0, 0)); - actionsContainer.setLayout(new GridLayout(0, 1, 0, 10)); + actionsContainer.setLayout(new GridLayout(5, 1, 0, 10)); syncPanel = buildLinkPanel(IMPORT_ICON, "Import local settings", "to remote RuneLite account", () -> { @@ -177,7 +181,8 @@ public class InfoPanel extends PluginPanel }); actionsContainer.add(buildLinkPanel(GITHUB_ICON, "License info", "for distribution", "https://github.com/runelite-extended/runelite/blob/master/LICENSE")); - actionsContainer.add(buildLinkPanel(DISCORD_ICON, "Talk to us on our", "discord server", "https://discord.gg/s2fzu5U")); + actionsContainer.add(buildLinkPanel(FOLDER_ICON, "Open logs directory", "(for bug reports)", LOGS_DIR)); + actionsContainer.add(buildLinkPanel(DISCORD_ICON, "Talk to us on our", "discord server", "https://discord.gg/HN5gf3m")); actionsContainer.add(buildLinkPanel(PATREON_ICON, "Patreon to support", "the RuneLitePlus devs", runeLiteProperties.getPatreonLink())); /* actionsContainer.add(buildLinkPanel(WIKI_ICON, "Information about", "RuneLite and plugins", runeLiteProperties.getWikiLink()));*/ @@ -188,6 +193,23 @@ public class InfoPanel extends PluginPanel eventBus.register(this); } + /** + * Builds a link panel with a given icon, text and directory to open. + */ + private JPanel buildLinkPanel(ImageIcon icon, String topText, String bottomText, File dir) + { + return buildLinkPanel(icon, topText, bottomText, () -> + { + try + { + Desktop.getDesktop().open(dir); + } + catch (IOException ex) + { + } + }); + } + /** * Builds a link panel with a given icon, text and url to redirect to. */ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/info/folder_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/info/folder_icon.png new file mode 100644 index 0000000000..41aa88c301 Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/info/folder_icon.png differ diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/info/wiki_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/info/wiki_icon.png deleted file mode 100644 index ece6eea18e..0000000000 Binary files a/runelite-client/src/main/resources/net/runelite/client/plugins/info/wiki_icon.png and /dev/null differ