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
49
49
func _ready ():
50
50
focus_mode = FocusMode .FOCUS_ALL
51
51
mouse_filter = Control .MOUSE_FILTER_IGNORE
52
+ focus_entered .connect (_block_on_focus_entered )
53
+ focus_exited .connect (_block_on_focus_exited )
52
54
_on_definition_changed ()
53
55
54
56
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
+
55
73
func _on_definition_changed ():
56
74
_block_extension = null
57
75
_update_template_editor ()
You can’t perform that action at this time.
0 commit comments