diff options
author | Linnea Gräf <nea@nea.moe> | 2023-11-12 03:02:02 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2023-11-12 03:02:02 +0100 |
commit | 15a20ef60a397e46021fdbcfc58a3f89214c500e (patch) | |
tree | 48103d11ec9368b4b7de1a1922b617524de64815 /src/main/kotlin/moe/nea/firmament/util | |
parent | 5f535b56d0009eefcf5d70f737dd70514802763f (diff) | |
download | Firmament-15a20ef60a397e46021fdbcfc58a3f89214c500e.tar.gz Firmament-15a20ef60a397e46021fdbcfc58a3f89214c500e.tar.bz2 Firmament-15a20ef60a397e46021fdbcfc58a3f89214c500e.zip |
Button editor pop out
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/MoulConfigUtils.kt | 12 |
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"))) + } +} |