diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-12 17:02:08 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-12 17:02:08 +0100 |
commit | b774daef5bd961f955d365ce07bd5aa4acb161f4 (patch) | |
tree | 8e5f8f92593f8c594cc25592901342cc8923cee9 /src/main/kotlin/gui/config/AllConfigsGui.kt | |
parent | 9763a4caa44fb6629aae92f3ad696487d962b0d9 (diff) | |
download | Firmament-b774daef5bd961f955d365ce07bd5aa4acb161f4.tar.gz Firmament-b774daef5bd961f955d365ce07bd5aa4acb161f4.tar.bz2 Firmament-b774daef5bd961f955d365ce07bd5aa4acb161f4.zip |
feat: MoulConfig config gui
Diffstat (limited to 'src/main/kotlin/gui/config/AllConfigsGui.kt')
-rw-r--r-- | src/main/kotlin/gui/config/AllConfigsGui.kt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/kotlin/gui/config/AllConfigsGui.kt b/src/main/kotlin/gui/config/AllConfigsGui.kt index 0e68bc8..16eb0a4 100644 --- a/src/main/kotlin/gui/config/AllConfigsGui.kt +++ b/src/main/kotlin/gui/config/AllConfigsGui.kt @@ -4,7 +4,6 @@ import io.github.notenoughupdates.moulconfig.observer.ObservableList import io.github.notenoughupdates.moulconfig.xml.Bind import net.minecraft.client.gui.screen.Screen import net.minecraft.text.Text -import moe.nea.firmament.repo.RepoManager import moe.nea.firmament.util.MC import moe.nea.firmament.util.MoulConfigUtils import moe.nea.firmament.util.ScreenUtil.setScreenLater @@ -18,6 +17,7 @@ object AllConfigsGui { object ConfigConfig : ManagedConfig("configconfig", Category.META) { val enableYacl by toggle("enable-yacl") { false } + val enableMoulConfig by toggle("enable-moulconfig") { false } } fun <T> List<T>.toObservableList(): ObservableList<T> = ObservableList(this) @@ -67,7 +67,11 @@ object AllConfigsGui { } fun makeScreen(parent: Screen? = null): Screen { - val wantedKey = if (ConfigConfig.enableYacl) "yacl" else "builtin" + val wantedKey = when { + ConfigConfig.enableMoulConfig -> "moulconfig" + ConfigConfig.enableYacl -> "yacl" + else -> "builtin" + } val provider = FirmamentConfigScreenProvider.providers.find { it.key == wantedKey } ?: FirmamentConfigScreenProvider.providers.first() return provider.open(parent) |