feat: Add Tts::screen_reader_available() to Tts resource.

This commit is contained in:
Nolan Darilek 2022-12-20 15:11:14 -06:00
parent 2191d22f55
commit d362d8c171

View File

@ -5,6 +5,12 @@ pub use tts::{self, Backends, Error, Features, UtteranceId};
#[derive(Resource, Clone, Deref, DerefMut)] #[derive(Resource, Clone, Deref, DerefMut)]
pub struct Tts(tts::Tts); pub struct Tts(tts::Tts);
impl Tts {
pub fn screen_reader_available() -> bool {
tts::Tts::screen_reader_available()
}
}
#[derive(Debug)] #[derive(Debug)]
pub enum TtsEvent { pub enum TtsEvent {
UtteranceBegin(UtteranceId), UtteranceBegin(UtteranceId),