mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-12 16:45:56 +00:00
Nolan Darilek
981606ab21
Here I add a `ScreenReader` `Node` which, when added to the `SceneTree`, should read the contents of any supported `Control`. I also do a bit of cleanup on filenames, as well as breaking the editor plugin support into its own class.
13 lines
397 B
GDScript
13 lines
397 B
GDScript
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")
|