From 816f80f862d2f5de6bc9b0ae84cd6df0da341228 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sat, 31 Aug 2024 11:59:47 +0200 Subject: Add configured compat [no changelog] --- src/main/kotlin/gui/config/AllConfigsGui.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin/gui/config/AllConfigsGui.kt') diff --git a/src/main/kotlin/gui/config/AllConfigsGui.kt b/src/main/kotlin/gui/config/AllConfigsGui.kt index 4f7731c..3091b2a 100644 --- a/src/main/kotlin/gui/config/AllConfigsGui.kt +++ b/src/main/kotlin/gui/config/AllConfigsGui.kt @@ -1,5 +1,3 @@ - - package moe.nea.firmament.gui.config import io.github.notenoughupdates.moulconfig.observer.ObservableList @@ -36,10 +34,16 @@ object AllConfigsGui { } } - fun makeScreen(parent: Screen? = null): Screen { + fun makeBuiltInScreen(parent: Screen? = null): Screen { return MoulConfigUtils.loadScreen("config/main", MainMapping(allConfigs), parent) } + fun makeScreen(parent: Screen? = null): Screen { + val provider = FirmamentConfigScreenProvider.providers.find { it.key == "builtin" } + ?: FirmamentConfigScreenProvider.providers.first() + return provider.open(parent) + } + fun showAllGuis() { setScreenLater(makeScreen()) } -- cgit