runelite-client: add configuration option for resizable
This commit is contained in:
@@ -200,6 +200,8 @@ public class RuneLite
|
||||
{
|
||||
gui.setAlwaysOnTop(runeliteConfig.gameAlwaysOnTop());
|
||||
}
|
||||
|
||||
gui.setResizable(runeliteConfig.isResizable());
|
||||
});
|
||||
|
||||
eventBus.post(new ClientUILoaded());
|
||||
|
||||
@@ -44,6 +44,16 @@ public interface RuneLiteConfig extends Config
|
||||
return Constants.GAME_FIXED_SIZE;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "isResizable",
|
||||
name = "Enable window resizing",
|
||||
description = "Determines if the window is resizable"
|
||||
)
|
||||
default boolean isResizable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "uiEnableCustomChrome",
|
||||
name = "Enable custom window chrome",
|
||||
|
||||
@@ -245,6 +245,14 @@ public class ClientUI extends JFrame
|
||||
}
|
||||
}
|
||||
|
||||
if (event.getKey().equals("isResizable"))
|
||||
{
|
||||
SwingUtilities.invokeLater(() ->
|
||||
{
|
||||
this.setResizable(Boolean.valueOf(event.getNewValue()));
|
||||
});
|
||||
}
|
||||
|
||||
if (!event.getKey().equals("gameSize"))
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user