runelite-client: add version to title

This commit is contained in:
Adam
2017-07-23 12:20:09 -04:00
parent 1a8db90c45
commit 54f9a0cf70
5 changed files with 88 additions and 3 deletions

View File

@@ -24,6 +24,7 @@
*/
package net.runelite.client;
import com.google.common.base.Strings;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.SubscriberExceptionContext;
import com.google.gson.Gson;
@@ -79,6 +80,7 @@ public class RuneLite
private static RuneLite runelite;
private static TrayIcon trayIcon;
private final RuneliteProperties properties = new RuneliteProperties();
private ClientUI gui;
private PluginManager pluginManager;
private final MenuManager menuManager = new MenuManager(this);
@@ -139,6 +141,7 @@ public class RuneLite
}
gui = new ClientUI();
setTitle(null);
setupTrayIcon();
});
@@ -164,6 +167,18 @@ public class RuneLite
loadSession();
}
public void setTitle(String extra)
{
if (!Strings.isNullOrEmpty(extra))
{
gui.setTitle("RuneLite " + properties.getVersion() + " " + extra);
}
else
{
gui.setTitle("RuneLite " + properties.getVersion());
}
}
private void setupTrayIcon()
{
if (!SystemTray.isSupported())
@@ -318,6 +333,11 @@ public class RuneLite
return runelite;
}
public RuneliteProperties getProperties()
{
return properties;
}
public ClientUI getGui()
{
return gui;