We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 78ebb6b + d27fa5c commit 85b809eCopy full SHA for 85b809e
src/main/kotlin/com/lambda/config/settings/comparable/EnumSetting.kt
@@ -17,6 +17,7 @@
17
18
package com.lambda.config.settings.comparable
19
20
+import com.google.gson.JsonElement
21
import com.google.gson.reflect.TypeToken
22
import com.lambda.brigadier.CommandResult.Companion.failure
23
import com.lambda.brigadier.CommandResult.Companion.success
@@ -52,6 +53,11 @@ class EnumSetting<T : Enum<T>>(
52
53
value = value.enumValues[to % value.enumValues.size]
54
}
55
56
+ override fun loadFromJson(serialized: JsonElement) {
57
+ super.loadFromJson(serialized)
58
+ index = value.ordinal // super bug fix for imgui
59
+ }
60
+
61
override fun ImGuiBuilder.buildLayout() {
62
val values = value.enumValues
63
val currentDisplay = value.displayValue
0 commit comments