aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/MoulConfigUtils.kt
blob: bdd1421aa8aa3c138abc89fc183fca68eb57cb0b (plain)
1
2
3
4
5
6
7
8
9
10
11
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")))
    }
}