Added command to toggle tts
parent
452bbdf86c
commit
b600eda78e
|
@ -521,6 +521,14 @@ namespace stardew_access
|
|||
|
||||
MainClass.DebugLog("Warnings is " + (MainClass.Config.Warning ? "on" : "off"));
|
||||
});
|
||||
|
||||
helper.ConsoleCommands.Add("tts", "Toggles the screen reader/tts", (string commmand, string[] args) =>
|
||||
{
|
||||
MainClass.Config.TTS = !MainClass.Config.TTS;
|
||||
helper.WriteConfig(MainClass.Config);
|
||||
|
||||
MainClass.DebugLog("TTS is " + (MainClass.Config.TTS ? "on" : "off"));
|
||||
});
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ namespace stardew_access
|
|||
public Boolean VerboseCoordinates { get; set; } = true;
|
||||
public Boolean SnapMouse { get; set; } = true; // Toggles the snap mouse feature
|
||||
public Boolean Warning { get; set; } = true; // Toggles the warnings feature
|
||||
public Boolean TTS { get; set; } = true; // Toggles the screen reader/tts.
|
||||
// TODO add command to toggle warning feature
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -62,11 +62,14 @@ namespace stardew_access.ScreenReader
|
|||
if (text == null)
|
||||
return;
|
||||
|
||||
if (initialized)
|
||||
{
|
||||
GoString str = new GoString(text, text.Length);
|
||||
Speak(str, interrupt);
|
||||
}
|
||||
if (!initialized)
|
||||
return;
|
||||
|
||||
if (!MainClass.Config.TTS)
|
||||
return;
|
||||
|
||||
GoString str = new GoString(text, text.Length);
|
||||
Speak(str, interrupt);
|
||||
}
|
||||
|
||||
public void SayWithChecker(string text, bool interrupt)
|
||||
|
|
|
@ -62,6 +62,9 @@ namespace stardew_access.ScreenReader
|
|||
if (screenReader == null)
|
||||
return;
|
||||
|
||||
if (!MainClass.Config.TTS)
|
||||
return;
|
||||
|
||||
screenReader.Speak(text, interrupt);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue