Add simple getter to determine if screen reader detection is supported.

At the moment, this only returns `true` on Windows desktop. Screen reader detection is not yet supported, but should eventually be possible for at least Windows and Android.
This commit is contained in:
Nolan Darilek 2020-01-25 08:57:19 -06:00
parent 2049954aa2
commit 0b92eef5e9

8
TTS.gd
View File

@ -70,6 +70,14 @@ func get_is_rate_supported():
var is_rate_supported setget , get_is_rate_supported var is_rate_supported setget , get_is_rate_supported
func get_can_detect_screen_reader():
if OS.get_name() == "Windows":
return true
else:
return false
var can_detect_screen_reader setget , get_can_detect_screen_reader
func singular_or_plural(count, singular, plural): func singular_or_plural(count, singular, plural):
if count == 1: if count == 1:
return singular return singular