diff options
author | syeyoung <cyong06@naver.com> | 2021-02-05 17:29:09 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-05 17:29:09 +0900 |
commit | 6b4e2499ece7f4328381a88380baea85fe24246d (patch) | |
tree | 07a1da8b9d2b6f543d5905a29adc2a5a1c46736d /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | 3d20d63e025b827ae9a8e7bd62b436fda7986071 (diff) | |
download | Skyblock-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.java | 17 |
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 ; + } } |