Initial Commit
Initial commit of Code Base.
This commit is contained in:
parent
293b1213e1
commit
c11a4ebbc2
653 changed files with 36893 additions and 1 deletions
24
addons/twitcher/editor/setup/focus_child_show.gd
Normal file
24
addons/twitcher/editor/setup/focus_child_show.gd
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
extends Node
|
||||
|
||||
@export var show_elements: Array[Control] = []
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for element: Control in show_elements:
|
||||
element.hide()
|
||||
|
||||
for child in get_children():
|
||||
if child.has_signal(&"focus_entered"):
|
||||
child.connect(&"focus_entered", _on_focus_entered)
|
||||
if child.has_signal(&"focus_exited"):
|
||||
child.connect(&"focus_exited", _on_focus_exited)
|
||||
|
||||
|
||||
func _on_focus_entered() -> void:
|
||||
for element: Node in show_elements:
|
||||
element.show()
|
||||
|
||||
|
||||
func _on_focus_exited() -> void:
|
||||
for element: Node in show_elements:
|
||||
element.hide()
|
||||
Loading…
Add table
Add a link
Reference in a new issue