Remove unnecessary code to set an initial scene focus.

This commit is contained in:
Nolan Darilek 2020-06-16 17:55:52 -05:00
parent 8f110a27d3
commit 76d1926385
2 changed files with 0 additions and 10 deletions

View File

@ -22,7 +22,6 @@ func _enter_tree():
screen_reader = ScreenReader.new() screen_reader = ScreenReader.new()
screen_reader.enable_focus_mode = true screen_reader.enable_focus_mode = true
get_tree().root.call_deferred("add_child", screen_reader) get_tree().root.call_deferred("add_child", screen_reader)
call_deferred("connect", "scene_changed", screen_reader, "set_initial_scene_focus")
call_deferred("connect", "main_screen_changed", screen_reader, "set_initial_screen_focus") call_deferred("connect", "main_screen_changed", screen_reader, "set_initial_screen_focus")
add_custom_type("ScreenReader", "Node", preload("ScreenReader.gd"), null) add_custom_type("ScreenReader", "Node", preload("ScreenReader.gd"), null)

View File

@ -79,15 +79,6 @@ func _find_focusable_control(node):
return null return null
func set_initial_scene_focus(scene):
self.augment_tree(get_tree().root)
var focus = _find_focusable_control(get_tree().root)
if not focus:
return
focus.grab_click_focus()
focus.grab_focus()
func _enter_tree(): func _enter_tree():
pause_mode = Node.PAUSE_MODE_PROCESS pause_mode = Node.PAUSE_MODE_PROCESS
if enabled: if enabled: