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):
37
37
func _set_block_type (new_block_type ):
38
38
block_type = new_block_type
39
39
queue_redraw ()
40
+ notify_property_list_changed ()
40
41
41
42
42
43
func _set_control_part (new_control_part ):
@@ -49,6 +50,13 @@ func _set_is_pointy_value(new_is_pointy_value):
49
50
queue_redraw ()
50
51
51
52
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
+
52
60
func _ready ():
53
61
parent_block = BlockTreeUtil .get_parent_block (self )
54
62
parent_block .focus_entered .connect (queue_redraw )
You can’t perform that action at this time.
0 commit comments