godot-accessibility/Plugin.gd

13 lines
397 B
GDScript3
Raw Normal View History

tool
extends EditorPlugin
var ScreenReader = preload("ScreenReader.gd")
var screen_reader
func _enter_tree():
screen_reader = ScreenReader.new()
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")