Implement the Quick enable render toggle
Also improve the logic for setting UI only config values
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.seibel.lod.common.wrappers.gui;
|
||||
|
||||
import com.seibel.lod.core.config.eventHandlers.QuickRenderToggleConfigEventHandler;
|
||||
import com.seibel.lod.core.config.eventHandlers.presets.RenderQualityPresetConfigEventHandler;
|
||||
import com.seibel.lod.core.config.eventHandlers.presets.ThreadPresetConfigEventHandler;
|
||||
import com.seibel.lod.coreapi.ModInfo;
|
||||
import com.seibel.lod.core.config.ConfigBase;
|
||||
import com.seibel.lod.core.config.gui.ConfigScreen;
|
||||
@@ -25,6 +28,7 @@ public class GetConfigScreen
|
||||
// This shouldn't be here, but I need a way to test it after Minecraft inits its assets
|
||||
//System.out.println(ConfigBase.INSTANCE.generateLang(false, true));
|
||||
|
||||
runGuiOnlyConfigSetup();
|
||||
|
||||
return switch (useScreen)
|
||||
{
|
||||
@@ -35,4 +39,16 @@ public class GetConfigScreen
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates any config values that are UI only
|
||||
* and adds any listeners that depend on multiple config values.
|
||||
*/
|
||||
private static void runGuiOnlyConfigSetup()
|
||||
{
|
||||
ThreadPresetConfigEventHandler.INSTANCE.setUiOnlyConfigValues();
|
||||
RenderQualityPresetConfigEventHandler.INSTANCE.setUiOnlyConfigValues();
|
||||
QuickRenderToggleConfigEventHandler.INSTANCE.setUiOnlyConfigValues();
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
Submodule coreSubProjects updated: 12d5d9e32b...24a335565e
Reference in New Issue
Block a user