File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
addons/block_code/ui/blocks/utilities/background Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ func _set_color(new_color):
3737func _set_block_type (new_block_type ):
3838 block_type = new_block_type
3939 queue_redraw ()
40+ notify_property_list_changed ()
4041
4142
4243func _set_control_part (new_control_part ):
@@ -49,6 +50,13 @@ func _set_is_pointy_value(new_is_pointy_value):
4950 queue_redraw ()
5051
5152
53+ func _validate_property (property : Dictionary ):
54+ if property .name == "control_part" and block_type != Types .BlockType .CONTROL :
55+ property .usage |= PROPERTY_USAGE_READ_ONLY
56+ elif property .name == "is_pointy_value" and block_type != Types .BlockType .VALUE :
57+ property .usage |= PROPERTY_USAGE_READ_ONLY
58+
59+
5260func _ready ():
5361 parent_block = BlockTreeUtil .get_parent_block (self )
5462 parent_block .focus_entered .connect (queue_redraw )
You can’t perform that action at this time.
0 commit comments