Augment controls with accessibility functionality when added. Add non-functional hooks for focus and input events.

This commit is contained in:
Nolan Darilek 2018-05-26 14:47:18 +00:00
parent ce419967ea
commit d2ab34c4e5

View File

@ -1,8 +1,20 @@
tool
extends EditorPlugin
func _focus_entered():
print("Focus entered.")
func _gui_input():
print("GUI input.")
func _augment_node(node):
if node is Control:
node.connect("focus_entered", self, "_focused")
node.connect("mouse_entered", self, "_focused")
node.connect("gui_input", self, "_gui_input")
func _enter_tree():
print("Hello, world.")
get_tree().connect("node_added", self, "_augment_node")
func _exit_tree():
# Clean-up of the plugin goes here