diff --git a/src/main/java/me/eigenraven/lwjgl3ify/relauncher/RelauncherConfig.java b/src/main/java/me/eigenraven/lwjgl3ify/relauncher/RelauncherConfig.java index 280fdc3..b07e1e3 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/relauncher/RelauncherConfig.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/relauncher/RelauncherConfig.java @@ -42,6 +42,7 @@ public ConfigObject() {} public int maxMemoryMB = 4096; public GCOption garbageCollector = GCOption.G1GC; public String[] customOptions = new String[0]; + public boolean hideSettingsOnLaunch = false; // Advanced public boolean forwardLogs = false; public boolean allowDebugger = false; diff --git a/src/main/java/me/eigenraven/lwjgl3ify/relauncher/RelauncherUserInterface.java b/src/main/java/me/eigenraven/lwjgl3ify/relauncher/RelauncherUserInterface.java index dc4acc3..61f1ef9 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/relauncher/RelauncherUserInterface.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/relauncher/RelauncherUserInterface.java @@ -166,6 +166,10 @@ private static long getTotalMemoryBytes() { } public void startSettingsIfNeeded() { + if (RelauncherConfig.config.hideSettingsOnLaunch) { + // TODO: Show a countdown and add a way to show settings again + return; + } invokeOnSwingThread(true, () -> { initSwingIfNeeded(); final JDialog settingsDialog = new JDialog( @@ -224,6 +228,10 @@ public void startSettingsIfNeeded() { contents.optFmlDebugAts.setSelected(initCfg.fmlDebugAts); contents.optRfbDumpClasses.setSelected(initCfg.rfbDumpClasses); contents.optRfbDumpTransformers.setSelected(initCfg.rfbDumpPerTransformer); + contents.optHideOnFutureLaunches.setSelected(initCfg.hideSettingsOnLaunch); + // do not show for now + contents.optHideOnFutureLaunches.setEnabled(false); + contents.optHideOnFutureLaunches.setVisible(false); refreshJavaInstalls(contents); saveConfig(contents); @@ -335,6 +343,7 @@ private static void saveConfig(SettingsDialog contents) { initCfg.fmlDebugAts = contents.optFmlDebugAts.isSelected(); initCfg.rfbDumpClasses = contents.optRfbDumpClasses.isSelected(); initCfg.rfbDumpPerTransformer = contents.optRfbDumpTransformers.isSelected(); + initCfg.hideSettingsOnLaunch = contents.optHideOnFutureLaunches.isSelected(); RelauncherConfig.save(); }