aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/MoulConfigUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/MoulConfigUtils.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/MoulConfigUtils.kt12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/MoulConfigUtils.kt b/src/main/kotlin/moe/nea/firmament/util/MoulConfigUtils.kt
new file mode 100644
index 0000000..bdd1421
--- /dev/null
+++ b/src/main/kotlin/moe/nea/firmament/util/MoulConfigUtils.kt
@@ -0,0 +1,12 @@
+package moe.nea.firmament.util
+
+import io.github.moulberry.moulconfig.common.MyResourceLocation
+import io.github.moulberry.moulconfig.gui.GuiContext
+import io.github.moulberry.moulconfig.xml.XMLUniverse
+
+object MoulConfigUtils {
+ val universe = XMLUniverse.getDefaultUniverse()
+ fun loadGui(name: String, bindTo: Any): GuiContext {
+ return GuiContext(universe.load(bindTo, MyResourceLocation("firmament", "gui/$name.xml")))
+ }
+}