Added naming menu title narration
parent
dc12fe99c8
commit
408cdbde66
|
@ -137,6 +137,11 @@ namespace stardew_access
|
|||
postfix: new HarmonyMethod(typeof(MenuPatch), nameof(MenuPatch.ConfirmationDialogPatch))
|
||||
);
|
||||
|
||||
harmony.Patch(
|
||||
original: AccessTools.Constructor(typeof(NamingMenu), new Type[] { typeof(NamingMenu.doneNamingBehavior), typeof(string), typeof(string) }),
|
||||
postfix: new HarmonyMethod(typeof(MenuPatch), nameof(MenuPatch.NamingMenuPatch))
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom Commands
|
||||
|
|
|
@ -17,6 +17,22 @@ namespace stardew_access.Patches
|
|||
private static string currentLevelUpTitle = " ";
|
||||
private const int MAX_COMPONENTS = 20;
|
||||
|
||||
internal static void NamingMenuPatch(NamingMenu __instance, string title, TextBox ___textBox)
|
||||
{
|
||||
try
|
||||
{
|
||||
__instance.textBoxCC.snapMouseCursor();
|
||||
___textBox.SelectMe();
|
||||
string toSpeak = $"{title}";
|
||||
|
||||
ScreenReader.sayWithChecker(toSpeak, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void ConfirmationDialogPatch(ConfirmationDialog __instance, string ___message)
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue