hide ResetConfirmation config menu
I couldn't easily implement a reset button since I can't control the config UI from Core.
This commit is contained in:
@@ -119,7 +119,7 @@ public class Config
|
||||
|
||||
|
||||
public static ConfigCategory advanced = new ConfigCategory.Builder().set(Advanced.class).build();
|
||||
public static ConfigCategory resetSettingsConfirmation = new ConfigCategory.Builder().set(ResetConfirmation.class).build();
|
||||
// public static ConfigCategory resetSettingsConfirmation = new ConfigCategory.Builder().set(ResetConfirmation.class).build();
|
||||
|
||||
public static class Advanced
|
||||
{
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.seibel.lod.core.config.eventHandlers;
|
||||
|
||||
import com.seibel.lod.api.DhApiMain;
|
||||
import com.seibel.lod.api.enums.config.EHorizontalResolution;
|
||||
import com.seibel.lod.api.enums.config.EVerticalQuality;
|
||||
import com.seibel.lod.core.config.Config;
|
||||
import com.seibel.lod.core.config.listeners.ConfigChangeListener;
|
||||
import com.seibel.lod.core.config.listeners.IConfigListener;
|
||||
import com.seibel.lod.core.util.DetailDistanceUtil;
|
||||
|
||||
public class ResetConfigEventHandler
|
||||
{
|
||||
public static ResetConfigEventHandler INSTANCE = new ResetConfigEventHandler();
|
||||
public final ConfigChangeListener<Boolean> configChangeListener;
|
||||
|
||||
|
||||
|
||||
/** private since we only ever need one handler at a time */
|
||||
private ResetConfigEventHandler()
|
||||
{
|
||||
this.configChangeListener = new ConfigChangeListener<>(Config.Client.ResetConfirmation.resetAllSettings, (resetSettings) -> { doStuff(resetSettings); });
|
||||
|
||||
}
|
||||
|
||||
private void doStuff(boolean resetSettings)
|
||||
{
|
||||
if (!resetSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Config.Client.ResetConfirmation.resetAllSettings.set(false);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user