Access the MACROS box directly in Configuration.kt
This commit is contained in:
parent
d315737321
commit
a5b1c45a86
|
@ -11,7 +11,6 @@ import com.typesafe.config.ConfigValueFactory
|
|||
import fr.username404.snowygui.ClickGui
|
||||
import fr.username404.snowygui.Snowy
|
||||
import fr.username404.snowygui.Snowy.Companion.MissingComponent
|
||||
import fr.username404.snowygui.gui.elements.ClickBox
|
||||
import fr.username404.snowygui.gui.feature.Category
|
||||
import fr.username404.snowygui.gui.feature.Macro
|
||||
import io.github.config4k.extract
|
||||
|
@ -36,7 +35,7 @@ object Configuration {
|
|||
mutableMapOf(
|
||||
"enabledFeatures" to enabledFeatures,
|
||||
"macros" to lazy {
|
||||
(ClickGui.components.find { it is ClickBox && it.isCategory(Category.MACROS) } as ClickBox).buttons.map {
|
||||
Category.MACROS.box.buttons.map {
|
||||
Json.encodeToString(it as Macro)
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue