mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-22 11:55:56 +00:00
Use get_tree().root for root node.
This commit is contained in:
parent
e42b054e86
commit
3694e50dda
|
@ -11,9 +11,7 @@ func augment_node(node):
|
||||||
func set_initial_screen_focus(screen):
|
func set_initial_screen_focus(screen):
|
||||||
print("Screen ",screen)
|
print("Screen ",screen)
|
||||||
var focus
|
var focus
|
||||||
var root = self
|
var root = get_tree().root
|
||||||
while root.get_parent() != null:
|
|
||||||
root = root.get_parent()
|
|
||||||
if screen == "3D":
|
if screen == "3D":
|
||||||
focus = root.find_node("ToolButton", true, false)
|
focus = root.find_node("ToolButton", true, false)
|
||||||
print("Focus ",focus)
|
print("Focus ",focus)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user