Add always on top setting

This commit is contained in:
NotFoxtrot
2018-02-13 21:09:01 +01:00
committed by Adam
parent 08e95c7cd6
commit 9bc6e079ce
3 changed files with 23 additions and 0 deletions

View File

@@ -192,6 +192,11 @@ public class RuneLite
}
gui.showWithChrome(runeliteConfig.enableCustomChrome());
if (gui.isAlwaysOnTopSupported())
{
gui.setAlwaysOnTop(runeliteConfig.gameAlwaysOnTop());
}
});
eventBus.post(new ClientUILoaded());

View File

@@ -65,4 +65,14 @@ public interface RuneLiteConfig extends Config
{
return true;
}
@ConfigItem(
keyName = "gameAlwaysOnTop",
name = "Enable client always on top",
description = "The game will always be on the top of the screen"
)
default boolean gameAlwaysOnTop()
{
return false;
}
}

View File

@@ -206,6 +206,14 @@ public class ClientUI extends JFrame
return;
}
if (event.getKey().equals("gameAlwaysOnTop"))
{
if (this.isAlwaysOnTopSupported())
{
this.setAlwaysOnTop(Boolean.valueOf(event.getNewValue()));
}
}
if (!event.getKey().equals("gameSize"))
{
return;