11package io.github.notenoughupdates.moulconfig.test
22
33import com.google.gson.annotations.Expose
4- import io.github.notenoughupdates.moulconfig.annotations.*
4+ import io.github.notenoughupdates.moulconfig.annotations.Accordion
5+ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean
6+ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList
7+ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown
8+ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorInfoText
9+ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind
10+ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider
11+ import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorText
12+ import io.github.notenoughupdates.moulconfig.annotations.ConfigOption
513import io.github.notenoughupdates.moulconfig.observer.Property
614import org.lwjgl.glfw.GLFW
7- import java.util.*
15+ import java.util.Arrays
816
917class TestCategoryA {
1018 @ConfigOption(name = " Test Option" , desc = " Test toggle" )
@@ -29,21 +37,29 @@ class TestCategoryA {
2937 }
3038
3139
32- @ConfigOption(name = " Number Dropdown " , desc = " 0, 1, 2, 3 " )
33- @ConfigEditorDropdown(values = [ " 0 " , " 1 " , " 2 " , " 3 " ] )
34- var numberDropdown : Int = 0
40+ @Accordion
41+ @ConfigOption(name = " Accordion " , desc = " " )
42+ var accordion = AccordionClass ()
3543
44+ class AccordionClass () {
45+
46+ @ConfigOption(name = " Number Dropdown" , desc = " 0, 1, 2, 3" )
47+ @ConfigEditorDropdown(values = [" 0" , " 1" , " 2" , " 3" ])
48+ var numberDropdown: Int = 0
3649
37- @ConfigOption(name = " Enum Dropdown" , desc = " 1, 2, 3, 4" )
38- @ConfigEditorDropdown
39- var enumDropdown: Property <DropdownEnum > = Property .of(DropdownEnum .FOUR )
50+
51+ @ConfigOption(name = " Enum Dropdown" , desc = " 1, 2, 3, 4" )
52+ @ConfigEditorDropdown
53+ var enumDropdown: Property <DropdownEnum > = Property .of(DropdownEnum .FOUR )
54+ }
4055
4156 enum class DropdownEnum (private val label : String ) {
4257 ONE (" 1" ),
4358 TWO (" 2" ),
4459 THREE (" 3" ),
4560 FOUR (" 4" ),
4661 ;
62+
4763 override fun toString (): String {
4864 return label
4965 }
@@ -65,7 +81,7 @@ class TestCategoryA {
6581
6682 @ConfigOption(name = " Draggable List" , desc = " §eDrag text to change the order of the list." )
6783 @ConfigEditorDraggableList(
68- exampleText = [" abc" , " dec" , " blah" ," surel it works really cool and great :))" ]
84+ exampleText = [" abc" , " dec" , " blah" , " surel it works really cool and great :))" ]
6985 )
7086 var draggableList: List <Int > = ArrayList (mutableListOf (0 , 1 , 2 , 3 ))
7187
0 commit comments