mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-14 01:15:56 +00:00
23 lines
564 B
GDScript
23 lines
564 B
GDScript
extends Object
|
|
|
|
var node
|
|
|
|
func _focused():
|
|
print("Focus entered.")
|
|
|
|
func _unfocused():
|
|
print("Unfocused")
|
|
|
|
func _gui_input():
|
|
print("GUI input.")
|
|
|
|
func _init(node):
|
|
# print(node.get_path())
|
|
self.node = node
|
|
self.node.connect("focus_entered", self, "_focused")
|
|
self.node.connect("mouse_entered", self, "_focused")
|
|
self.node.connect("focus_exited", self, "_unfocused")
|
|
self.node.connect("mouse_exited", self, "_unfocused")
|
|
self.node.connect("gui_input", self, "_gui_input")
|
|
self.node.connect("tree_exiting", self, "free")
|