aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-05 17:29:09 +0900
committersyeyoung <cyong06@naver.com>2021-02-05 17:29:09 +0900
commit6b4e2499ece7f4328381a88380baea85fe24246d (patch)
tree07a1da8b9d2b6f543d5905a29adc2a5a1c46736d /src/main/java/kr/syeyoung/dungeonsguide/features
parent3d20d63e025b827ae9a8e7bd62b436fda7986071 (diff)
downloadSkyblock-Dungeons-Guide-6b4e2499ece7f4328381a88380baea85fe24246d.tar.gz
Skyblock-Dungeons-Guide-6b4e2499ece7f4328381a88380baea85fe24246d.tar.bz2
Skyblock-Dungeons-Guide-6b4e2499ece7f4328381a88380baea85fe24246d.zip
Gui Overhaul part 1
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
index 30b1a29a..77b852b0 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
@@ -1,12 +1,17 @@
package kr.syeyoung.dungeonsguide.features;
+import com.google.common.base.Supplier;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
+import kr.syeyoung.dungeonsguide.config.guiconfig.ConfigPanelCreator;
+import kr.syeyoung.dungeonsguide.config.guiconfig.GuiConfig;
+import kr.syeyoung.dungeonsguide.config.guiconfig.PanelDefaultParameterConfig;
import kr.syeyoung.dungeonsguide.config.types.TypeConverter;
import kr.syeyoung.dungeonsguide.config.types.TypeConverterRegistry;
-import kr.syeyoung.dungeonsguide.features.FeatureParameter;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import lombok.Getter;
import lombok.Setter;
+import net.minecraft.client.Minecraft;
import java.util.*;
@@ -61,4 +66,14 @@ public abstract class AbstractFeature {
object.addProperty("$enabled", isEnabled());
return object;
}
+
+ public String getEditRoute(final GuiConfig config) {
+ ConfigPanelCreator.map.put("base." + key , new Supplier<MPanel>() {
+ @Override
+ public MPanel get() {
+ return new PanelDefaultParameterConfig(config, AbstractFeature.this);
+ }
+ });
+ return "base." + key ;
+ }
}