Make Accessible extend Node and parent it to ScreenReader for easier cleanup.

This commit is contained in:
Nolan Darilek 2019-12-22 18:55:45 -06:00
parent 6adce2706c
commit dfe0c8179e
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
extends Object extends Node
var node var node

View File

@ -23,7 +23,8 @@ func unfocused(node):
func augment_node(node): func augment_node(node):
if node is Control: if node is Control:
Accessible.new(node) var accessible = Accessible.new(node)
add_child(accessible)
if not node.is_connected("focus_entered", self, "focused"): if not node.is_connected("focus_entered", self, "focused"):
node.connect("focus_entered", self, "focused", [node]) node.connect("focus_entered", self, "focused", [node])
if not node.is_connected("mouse_entered", self, "click_focused"): if not node.is_connected("mouse_entered", self, "click_focused"):