godot-accessibility/Plugin.gd
Nolan Darilek 23fd884b2e Various changes:
* Add automatic speaking of percentages when changed.
 * Remove icon for now.
2019-10-08 08:56:51 -05:00

18 lines
601 B
GDScript

tool
extends EditorPlugin
var ScreenReader = preload("ScreenReader.gd")
var screen_reader
func _enter_tree():
add_autoload_singleton("TTS", "res://addons/godot-tts/TTS.gd")
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")
add_custom_type("ScreenReader", "Node", preload("ScreenReader.gd"), null)
func _exit_tree():
remove_custom_type("ScreenReader")