I have almost ready a script that load a dynamic enum, but I don’t know how set the enum initial position to one index (but not using default value)
For example, what I want is something like:
if a == b:
enum.idx = 3
enum.idx = 0
The enum is loaded with a function callback dynamically.
dynamic enums can’t have a default value, however, they will the first element by default.
Yes, by default is first element, but I have noticed that sometimes, the enum is empty (visually) but if you read the value, it has the first value.
After select the first element (making visible first element manually moving with the mouse the list) I can reload the enum with different values and always default value is visible. The “empty” element is only the first time.
How can I be sure the first element is always visible?
Not sure, this is kind of a design flaw. Maybe report to the bug tracker?