From 5b378592161305d660548dcb6650d5c704904502 Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Date: Mon, 6 Jun 2022 22:43:25 +0530 Subject: [PATCH] Fixed advanced game options menu --- stardew-access/Patches/TitleMenuPatches.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stardew-access/Patches/TitleMenuPatches.cs b/stardew-access/Patches/TitleMenuPatches.cs index 85b5010..3873cf3 100644 --- a/stardew-access/Patches/TitleMenuPatches.cs +++ b/stardew-access/Patches/TitleMenuPatches.cs @@ -20,6 +20,18 @@ namespace stardew_access.Patches { int currentItemIndex = Math.Max(0, Math.Min(__instance.options.Count - 7, __instance.currentItemIndex)); int x = Game1.getMouseX(true), y = Game1.getMouseY(true); + + if (__instance.okButton != null && __instance.okButton.containsPoint(x, y)) + { + string toSpeak = "OK Button"; + if (advancedGameOptionsQueryKey != toSpeak) + { + advancedGameOptionsQueryKey = toSpeak; + MainClass.ScreenReader.Say(toSpeak, true); + } + return; + } + for (int i = 0; i < __instance.optionSlots.Count; i++) { if (__instance.optionSlots[i].bounds.Contains(x, y) && currentItemIndex + i < __instance.options.Count && __instance.options[currentItemIndex + i].bounds.Contains(x - __instance.optionSlots[i].bounds.X, y - __instance.optionSlots[i].bounds.Y))