* Exit Menu Page is now accessible
* Fix for delete button hover text not narrating
This commit is contained in:
@@ -33,6 +33,10 @@ namespace stardew_access.Patches
|
||||
{
|
||||
try
|
||||
{
|
||||
// Fix for delete button hover text not narrating
|
||||
if (Game1.activeClickableMenu is LoadGameMenu || Game1.activeClickableMenu is TitleMenu)
|
||||
return;
|
||||
|
||||
StringBuilder toSpeak = new StringBuilder();
|
||||
|
||||
#region Add title if any
|
||||
@@ -47,7 +51,6 @@ namespace stardew_access.Patches
|
||||
#region Add crafting ingredients
|
||||
if (craftingIngredients != null)
|
||||
{
|
||||
|
||||
toSpeak.Append($"\n{craftingIngredients.description}");
|
||||
toSpeak.Append("\nIngredients\n");
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using StardewModdingAPI;
|
||||
using StardewModdingAPI;
|
||||
using StardewValley;
|
||||
using StardewValley.Menus;
|
||||
|
||||
@@ -69,6 +67,13 @@ namespace stardew_access.Patches
|
||||
if (__instance.Farmer == null)
|
||||
return;
|
||||
|
||||
if (___menu.deleteButtons[i].containsPoint(Game1.getMousePosition(true).X, Game1.getMousePosition(true).Y))
|
||||
{
|
||||
// Fix for delete button hover text not narrating
|
||||
ScreenReader.sayWithChecker($"Delete {__instance.Farmer.farmName} Farm", true);
|
||||
return;
|
||||
}
|
||||
|
||||
String farmerName = __instance.Farmer.Name;
|
||||
String farmName = __instance.Farmer.farmName;
|
||||
String money = __instance.Farmer.Money.ToString();
|
||||
@@ -87,5 +92,19 @@ namespace stardew_access.Patches
|
||||
MainClass.monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void ExitPagePatch(ExitPage __instance)
|
||||
{
|
||||
if (__instance.exitToTitle.visible &&
|
||||
__instance.exitToTitle.containsPoint(Game1.getMousePosition(true).X, Game1.getMousePosition(true).Y))
|
||||
{
|
||||
ScreenReader.sayWithChecker("Exit to Title Button", true);
|
||||
}
|
||||
if (__instance.exitToDesktop.visible &&
|
||||
__instance.exitToDesktop.containsPoint(Game1.getMousePosition(true).X, Game1.getMousePosition(true).Y))
|
||||
{
|
||||
ScreenReader.sayWithChecker("Exit to Desktop Button", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user