File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
addons/block_code/ui/blocks/utilities/parameter_input Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ signal modified
1111
1212@export var variant_type : Variant .Type = TYPE_STRING
1313@export var block_type : Types .BlockType = Types .BlockType .VALUE
14- var option : bool = false
14+ var option : bool = false :
15+ set = _set_option
1516
1617@onready var _panel := % Panel
1718@onready var snap_point := % SnapPoint
@@ -103,11 +104,22 @@ func _set_placeholder(new_placeholder: String) -> void:
103104 _line_edit .placeholder_text = placeholder
104105
105106
107+ func _set_option (value : bool ) -> void :
108+ option = value
109+
110+ if not is_node_ready ():
111+ return
112+
113+ # If options are being provided, you can't snap blocks.
114+ snap_point .visible = not option
115+
116+
106117func _ready ():
107118 var stylebox = _panel .get_theme_stylebox ("panel" )
108119 stylebox .bg_color = Color .WHITE
109120
110121 _set_placeholder (placeholder )
122+ _set_option (option )
111123
112124 snap_point .block_type = block_type
113125 snap_point .variant_type = variant_type
You can’t perform that action at this time.
0 commit comments