aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-03-29 13:54:33 +0200
committernea <nea@nea.moe>2023-03-29 13:54:33 +0200
commit7e9c44f0dd5e7c078df73d35cd3bf7b02ffffec6 (patch)
tree5b095f4c4c40410ab9d2d0b4e30e55e0e7c21a02 /src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt
parentd90187217926ac53fdeee5420bb331a1f4335e91 (diff)
downloadskyhanni-7e9c44f0dd5e7c078df73d35cd3bf7b02ffffec6.tar.gz
skyhanni-7e9c44f0dd5e7c078df73d35cd3bf7b02ffffec6.tar.bz2
skyhanni-7e9c44f0dd5e7c078df73d35cd3bf7b02ffffec6.zip
Bump MoulConfig for better sizes; Keep gui editor state
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt
new file mode 100644
index 000000000..d1b84f09c
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt
@@ -0,0 +1,18 @@
+package at.hannibal2.skyhanni.config
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import io.github.moulberry.moulconfig.gui.GuiScreenElementWrapper
+import io.github.moulberry.moulconfig.gui.MoulConfigEditor
+
+object ConfigGuiManager {
+ val configEditor by lazy { MoulConfigEditor(SkyHanniMod.configManager.processor) }
+
+ fun openConfigGui(search: String? = null) {
+ if (search != null) {
+ configEditor.search(search)
+ }
+ SkyHanniMod.screenToOpen = GuiScreenElementWrapper(configEditor)
+ }
+
+
+} \ No newline at end of file