Skip to content

Commit

Permalink
Relauncher: hide the "do not show on future launches" option for now
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven committed Apr 6, 2024
1 parent 7d4e9ad commit 6fe3cbe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 6fe3cbe

Please sign in to comment.