aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-08-01 23:43:10 +0900
committersyeyoung <cyong06@naver.com>2021-08-01 23:43:10 +0900
commitd1c36c2412b98350f8336e38361e49b3655982d5 (patch)
tree34f2d6396f69840f623254b5c6e50c3563f5cfda /src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
parent16a4367663f5ed2a909804de6d319c97c9854ecc (diff)
downloadSkyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.tar.gz
Skyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.tar.bz2
Skyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.zip
Too many changes to describe
Config gui overhaul.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
index 7b2d5ba0..c71639cd 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/AbstractFeature.java
@@ -21,9 +21,7 @@ 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.old.ConfigPanelCreator;
-import kr.syeyoung.dungeonsguide.config.guiconfig.old.GuiConfig;
-import kr.syeyoung.dungeonsguide.config.guiconfig.old.PanelDefaultParameterConfig;
+import kr.syeyoung.dungeonsguide.config.guiconfig.nyu.*;
import kr.syeyoung.dungeonsguide.config.types.TypeConverter;
import kr.syeyoung.dungeonsguide.config.types.TypeConverterRegistry;
import kr.syeyoung.dungeonsguide.gui.MPanel;
@@ -84,11 +82,15 @@ public abstract class AbstractFeature {
return object;
}
- public String getEditRoute(final GuiConfig config) {
+ public String getEditRoute(RootConfigPanel rootConfigPanel) {
ConfigPanelCreator.map.put("base." + key , new Supplier<MPanel>() {
@Override
public MPanel get() {
- return new PanelDefaultParameterConfig(config, AbstractFeature.this, Collections.emptyList(), Collections.emptySet());
+ MFeatureEdit featureEdit = new MFeatureEdit(AbstractFeature.this, rootConfigPanel);
+ for (FeatureParameter parameter: getParameters()) {
+ featureEdit.addParameterEdit(parameter.getKey(), new MParameterEdit(AbstractFeature.this, parameter, rootConfigPanel));
+ }
+ return featureEdit;
}
});
return "base." + key ;