File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
modern/templates/kotlin/test Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11package io.github.notenoughupdates.moulconfig.test
22
33import io.github.notenoughupdates.moulconfig.common.IItemStack
4+ import io.github.notenoughupdates.moulconfig.common.IMinecraft
45import io.github.notenoughupdates.moulconfig.gui.CloseEventListener
56import io.github.notenoughupdates.moulconfig.gui.GuiComponentWrapper
67import io.github.notenoughupdates.moulconfig.gui.GuiContext
@@ -27,7 +28,9 @@ class FabricMain : ModInitializer {
2728 ClientCommandRegistrationCallback .EVENT .register { a, b ->
2829 a.register(literal(" moulconfig" ).executes {
2930 MinecraftClient .getInstance().send {
30- config.openConfigGui()
31+ val editor = config.getEditor()
32+ editor.setWide(config.instance.testCategoryA.isWide)
33+ IMinecraft .instance.openWrappedScreen(editor)
3134 }
3235 0
3336 })
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ import org.lwjgl.glfw.GLFW
88import java.util.Arrays
99
1010class TestCategoryA {
11+
12+ @ConfigOption(name = " Open Wide" , desc= " Use a wider config menu" )
13+ @ConfigEditorBoolean
14+ var isWide: Boolean = false
1115 @ConfigOption(name = " Test Option" , desc = " Test toggle" )
1216 @ConfigEditorBoolean
1317 var shouldTestToggle: Boolean = false
You can’t perform that action at this time.
0 commit comments