Merge pull request #3597 from raqes/info-wiki-link

Add wiki link to info panel
This commit is contained in:
Tomas Slusny
2018-06-17 04:18:11 +02:00
committed by GitHub
4 changed files with 11 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ public class RuneLiteProperties
private static final String DISCORD_APP_ID = "runelite.discord.appid";
private static final String DISCORD_INVITE = "runelite.discord.invite";
private static final String GITHUB_LINK = "runelite.github.link";
private static final String WIKI_LINK = "runelite.wiki.link";
private static final String PATREON_LINK = "runelite.patreon.link";
private static final String LAUNCHER_VERSION_PROPERTY = "runelite.launcher.version";
@@ -90,6 +91,11 @@ public class RuneLiteProperties
return properties.getProperty(GITHUB_LINK);
}
public String getWikiLink()
{
return properties.getProperty(WIKI_LINK);
}
public String getPatreonLink()
{
return properties.getProperty(PATREON_LINK);

View File

@@ -69,6 +69,7 @@ public class InfoPanel extends PluginPanel
private static final ImageIcon GITHUB_ICON;
private static final ImageIcon DISCORD_ICON;
private static final ImageIcon PATREON_ICON;
private static final ImageIcon WIKI_ICON;
private final JLabel loggedLabel = new JLabel();
private final JRichTextPane emailLabel = new JRichTextPane();
@@ -99,6 +100,7 @@ public class InfoPanel extends PluginPanel
GITHUB_ICON = new ImageIcon(ImageIO.read(InfoPanel.class.getResourceAsStream("github_icon.png")));
DISCORD_ICON = new ImageIcon(ImageIO.read(InfoPanel.class.getResourceAsStream("discord_icon.png")));
PATREON_ICON = new ImageIcon(ImageIO.read(InfoPanel.class.getResourceAsStream("patreon_icon.png")));
WIKI_ICON = new ImageIcon(ImageIO.read(InfoPanel.class.getResourceAsStream("wiki_icon.png")));
}
}
catch (IOException e)
@@ -166,11 +168,12 @@ public class InfoPanel extends PluginPanel
JPanel actionsContainer = new JPanel();
actionsContainer.setBorder(new EmptyBorder(10, 0, 0, 0));
actionsContainer.setLayout(new GridLayout(3, 1, 0, 10));
actionsContainer.setLayout(new GridLayout(4, 1, 0, 10));
actionsContainer.add(buildLinkPanel(GITHUB_ICON, "Report an issue or", "make a suggestion", runeLiteProperties.getGithubLink()));
actionsContainer.add(buildLinkPanel(DISCORD_ICON, "Talk to us on our", "discord server", runeLiteProperties.getDiscordInvite()));
actionsContainer.add(buildLinkPanel(PATREON_ICON, "Become a patron to", "help support RuneLite", runeLiteProperties.getPatreonLink()));
actionsContainer.add(buildLinkPanel(WIKI_ICON, "Information about", "RuneLite and plugins", runeLiteProperties.getWikiLink()));
add(versionPanel, BorderLayout.NORTH);
add(actionsContainer, BorderLayout.CENTER);

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -4,4 +4,5 @@ runescape.version=${rs.version}
runelite.discord.appid=409416265891971072
runelite.discord.invite=https://discord.gg/R4BQ8tU
runelite.github.link=https://github.com/runelite
runelite.wiki.link=https://github.com/runelite/runelite/wiki
runelite.patreon.link=https://www.patreon.com/runelite