Setting a Variant
This commit is contained in:
@@ -81,7 +81,7 @@ func _build_fields(r: Dictionary) -> void:
|
||||
var opt := OptionButton.new()
|
||||
for o in options:
|
||||
opt.add_item(o)
|
||||
var cur := get_s.call(key, def_v)
|
||||
var cur : Variant = get_s.call(key, def_v)
|
||||
var idx := options.find(cur)
|
||||
opt.selected = idx if idx >= 0 else 0
|
||||
hbox.add_child(opt)
|
||||
|
||||
Reference in New Issue
Block a user