blob: 9708c513b9cfbe3a5e94cc3abe10c3896ec95aaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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 {
var editor: MoulConfigEditor<Features>? = null
fun openConfigGui(search: String? = null) {
if (editor == null) {
editor = MoulConfigEditor(SkyHanniMod.configManager.processor)
}
val editor = editor ?: return
if (search != null) {
editor.search(search)
}
SkyHanniMod.screenToOpen = GuiScreenElementWrapper(editor)
}
}
|