mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-22 03:45:56 +00:00
Remove unnecessary code to set an initial scene focus.
This commit is contained in:
parent
8f110a27d3
commit
76d1926385
|
@ -22,7 +22,6 @@ func _enter_tree():
|
|||
screen_reader = ScreenReader.new()
|
||||
screen_reader.enable_focus_mode = true
|
||||
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")
|
||||
add_custom_type("ScreenReader", "Node", preload("ScreenReader.gd"), null)
|
||||
|
||||
|
|
|
@ -79,15 +79,6 @@ func _find_focusable_control(node):
|
|||
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():
|
||||
pause_mode = Node.PAUSE_MODE_PROCESS
|
||||
if enabled:
|
||||
|
|
Loading…
Reference in New Issue
Block a user