mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-21 19:45:55 +00:00
Augment controls with accessibility functionality when added. Add non-functional hooks for focus and input events.
This commit is contained in:
parent
ce419967ea
commit
d2ab34c4e5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user