Merge pull request #982 from deathbeam/fix-clientui-init
Fix ClientUI settings loading
This commit is contained in:
@@ -150,9 +150,6 @@ public class RuneLite
|
||||
// Initialize Discord service
|
||||
discordService.init();
|
||||
|
||||
// Load user configuration
|
||||
configManager.load();
|
||||
|
||||
// Register event listeners
|
||||
eventBus.register(clientUI);
|
||||
eventBus.register(overlayRenderer);
|
||||
@@ -160,6 +157,9 @@ public class RuneLite
|
||||
eventBus.register(chatMessageManager);
|
||||
eventBus.register(pluginManager);
|
||||
|
||||
// Load user configuration
|
||||
configManager.load();
|
||||
|
||||
// Tell the plugin manager if client is outdated or not
|
||||
pluginManager.setOutdated(isOutdated);
|
||||
|
||||
|
||||
@@ -173,6 +173,19 @@ public class ConfigManager
|
||||
try (FileInputStream in = new FileInputStream(propertiesFile))
|
||||
{
|
||||
properties.load(in);
|
||||
|
||||
properties.forEach((groupAndKey, value) ->
|
||||
{
|
||||
final String[] split = ((String)groupAndKey).split("\\.");
|
||||
final String groupName = split[0];
|
||||
final String key = split[1];
|
||||
ConfigChanged configChanged = new ConfigChanged();
|
||||
configChanged.setGroup(groupName);
|
||||
configChanged.setKey(key);
|
||||
configChanged.setOldValue(null);
|
||||
configChanged.setNewValue((String) value);
|
||||
eventBus.post(configChanged);
|
||||
});
|
||||
}
|
||||
catch (FileNotFoundException ex)
|
||||
{
|
||||
|
||||
@@ -152,7 +152,7 @@ public class ClientUI
|
||||
|
||||
if (event.getKey().equals("lockWindowSize"))
|
||||
{
|
||||
SwingUtilities.invokeLater(() -> frame.setResizable(!config.lockWindowSize()));
|
||||
frame.setResizable(!config.lockWindowSize());
|
||||
}
|
||||
|
||||
if (!event.getKey().equals("gameSize"))
|
||||
|
||||
Reference in New Issue
Block a user