Merge pull request #761 from Blizik/master

Add option to disable resizing of window
This commit is contained in:
Adam
2018-03-06 12:52:38 -05:00
committed by GitHub
3 changed files with 20 additions and 0 deletions

View File

@@ -200,6 +200,8 @@ public class RuneLite
{ {
gui.setAlwaysOnTop(runeliteConfig.gameAlwaysOnTop()); gui.setAlwaysOnTop(runeliteConfig.gameAlwaysOnTop());
} }
gui.setResizable(runeliteConfig.isResizable());
}); });
eventBus.post(new ClientUILoaded()); eventBus.post(new ClientUILoaded());

View File

@@ -44,6 +44,16 @@ public interface RuneLiteConfig extends Config
return Constants.GAME_FIXED_SIZE; 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( @ConfigItem(
keyName = "uiEnableCustomChrome", keyName = "uiEnableCustomChrome",
name = "Enable custom window chrome", name = "Enable custom window chrome",

View File

@@ -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")) if (!event.getKey().equals("gameSize"))
{ {
return; return;