Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions addons/block_code/ui/blocks/block/block.gd
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,27 @@ var _block_extension: BlockExtension
func _ready():
focus_mode = FocusMode.FOCUS_ALL
mouse_filter = Control.MOUSE_FILTER_IGNORE
focus_entered.connect(_block_on_focus_entered)
focus_exited.connect(_block_on_focus_exited)
_on_definition_changed()


func _block_on_focus_entered():
z_index = 1
if bottom_snap:
bottom_snap.z_index = -1
if child_snap:
child_snap.z_index = -1


func _block_on_focus_exited():
z_index = 0
if bottom_snap:
bottom_snap.z_index = 0
if child_snap:
child_snap.z_index = 0


func _on_definition_changed():
_block_extension = null
_update_template_editor()
Expand Down