File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,8 @@ class EditorPropertyPortraits extends EditorProperty:
418
418
var options :OptionButton
419
419
420
420
func _option_selected (option :int ) -> void :
421
- pass
421
+ var value = options .get_item_metadata (option )
422
+ emit_changed (get_edited_property (), value )
422
423
423
424
424
425
func _set_read_only (value :bool ) -> void :
@@ -459,15 +460,12 @@ class EditorPropertyPortraits extends EditorProperty:
459
460
current_value += 1
460
461
461
462
462
- func set_option_button_clip (enable :bool ) -> void :
463
- pass
464
-
465
-
466
463
func _init () -> void :
467
464
options = OptionButton .new ()
468
465
options .flat = true
469
466
options .clip_text = true
470
467
options .expand_icon = true
468
+ options .connect ("item_selected" , self , "_option_selected" )
471
469
var _options_popup :PopupMenu = options .get_popup ()
472
470
_options_popup .allow_search = true
473
471
add_child (options )
You can’t perform that action at this time.
0 commit comments