File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
addons/block_code/ui/blocks/block Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,27 @@ var _block_extension: BlockExtension
4949func _ready ():
5050 focus_mode = FocusMode .FOCUS_ALL
5151 mouse_filter = Control .MOUSE_FILTER_IGNORE
52+ focus_entered .connect (_block_on_focus_entered )
53+ focus_exited .connect (_block_on_focus_exited )
5254 _on_definition_changed ()
5355
5456
57+ func _block_on_focus_entered ():
58+ z_index = 1
59+ if bottom_snap :
60+ bottom_snap .z_index = - 1
61+ if child_snap :
62+ child_snap .z_index = - 1
63+
64+
65+ func _block_on_focus_exited ():
66+ z_index = 0
67+ if bottom_snap :
68+ bottom_snap .z_index = 0
69+ if child_snap :
70+ child_snap .z_index = 0
71+
72+
5573func _on_definition_changed ():
5674 _block_extension = null
5775 _update_template_editor ()
You can’t perform that action at this time.
0 commit comments