Merge pull request #761 from Blizik/master
Add option to disable resizing of window
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user