Back to storing Accessible as array in ScreenReader, since otherwise the SceneTree is thrashed.

This commit is contained in:
Nolan Darilek 2019-12-29 19:53:15 -06:00
parent 833a34b602
commit 96e7153410

View File

@ -11,6 +11,8 @@ signal swipe_down
var Accessible = preload("Accessible.gd") var Accessible = preload("Accessible.gd")
var accessibles = []
export var min_swipe_distance = 5 export var min_swipe_distance = 5
export var tap_execute_interval = 125 export var tap_execute_interval = 125
@ -31,7 +33,7 @@ func unfocused(node):
func augment_node(node): func augment_node(node):
if node is Control: if node is Control:
var accessible = Accessible.new(node) var accessible = Accessible.new(node)
add_child(accessible) accessibles.append(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"):