mirror of
https://github.com/lightsoutgames/godot-accessible-starter.git
synced 2024-09-07 22:15:57 +00:00
Load ScreenReader
as a global, removing the need to instantiate one per scene.
This commit is contained in:
parent
a88b30e7d1
commit
7a2e9d53c5
|
@ -6,6 +6,7 @@ This starter project sets up [Godot](https://godotengine.org) with the [accessib
|
|||
|
||||
* Linux via Speech Dispatcher
|
||||
* Windows via Tolk, including SAPI support for anyone not using a screen reader (not yet tested but code is written)
|
||||
* Android
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -30,11 +31,12 @@ from within this repository and start building your game!
|
|||
|
||||
* The accessibility plugin is automatically loaded, eliminating the need to use the inaccessible editor to enable it.
|
||||
* TTS is loaded in a global script which is available in every node. Run `TTS.speak("Text to speak", interrupt)` from anywhere in your code to speak something. See _scenes/Main.gd_ as an example.
|
||||
* `ScreenReader` is also loaded as a global node, making in-game user interfaces automatically accessible.
|
||||
* A Main scene with a script is created, and set as the launch scene.
|
||||
|
||||
## Accessibility tips
|
||||
|
||||
* Navigate to Editor -> Editor Settings -> External Editor, check the box, and enter a path to an accessible text editor. The embedded Godot script editor is not currently accessible, and may not be for a long time or at all.
|
||||
* Navigate to Editor -> Editor Settings -> External Editor, check the box, and enter a path to an accessible text editor. The embedded Godot script editor is not currently accessible, and may not be for a long time or at all. VSCode is a good option.
|
||||
|
||||
## Testing
|
||||
|
||||
|
@ -51,4 +53,4 @@ $ cd ..
|
|||
$ git commit godot-accessibility -m "Update accessibility plugin."
|
||||
```
|
||||
|
||||
or something similar. Likewise, you'll also likely want to upgrade the godot-tts plugin from time to time.
|
||||
or something similar. Likewise, you'll also likely want to upgrade the godot-tts plugin from time to time, and check this starter for current suggested best practices.
|
||||
|
|
|
@ -19,6 +19,7 @@ run/main_scene="res://scenes/Main.tscn"
|
|||
|
||||
[autoload]
|
||||
|
||||
ScreenReader="*res://addons/godot-accessibility/ScreenReader.gd"
|
||||
TTS="*res://addons/godot-tts/TTS.gd"
|
||||
|
||||
[editor_plugins]
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/Main.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot-accessibility/ScreenReader.gd" type="Script" id=2]
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="ScreenReader" type="Node" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
|
|
Loading…
Reference in New Issue
Block a user