From 3694e50ddae89aa5d60ff3b33cb43a34bd65b287 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 7 Jun 2018 21:13:55 +0000 Subject: [PATCH] Use get_tree().root for root node. --- addons/accessibility/accessibility.gd | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/accessibility/accessibility.gd b/addons/accessibility/accessibility.gd index baad3a5..0e4485e 100644 --- a/addons/accessibility/accessibility.gd +++ b/addons/accessibility/accessibility.gd @@ -11,9 +11,7 @@ func augment_node(node): func set_initial_screen_focus(screen): print("Screen ",screen) var focus - var root = self - while root.get_parent() != null: - root = root.get_parent() + var root = get_tree().root if screen == "3D": focus = root.find_node("ToolButton", true, false) print("Focus ",focus)