Fix label for OptionParameter in orx-gui

This commit is contained in:
Edwin Jakobs
2020-04-16 19:48:12 +02:00
parent 7cb6785a56
commit b1f74c69d3

View File

@@ -575,10 +575,10 @@ class GUI : Extension {
}
}
ParameterType.Option -> {
println("yo option")
dropdownButton {
val enumProperty = parameter.property as KMutableProperty1<Any, Enum<*>>
val value = enumProperty.get(obj)
label = parameter.label
// -- this is dirty, but it is the only way to get the constants for arbitrary enums
// -- (that I know of, at least)
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") val jEnum = value as java.lang.Enum<*>