Moved game menu patch
parent
8d11cc6266
commit
911c93a555
|
@ -65,7 +65,7 @@ namespace stardew_access
|
|||
#region Game Menu Patches
|
||||
harmony.Patch(
|
||||
original: AccessTools.Method(typeof(GameMenu), nameof(GameMenu.draw), new Type[] { typeof(SpriteBatch) }),
|
||||
postfix: new HarmonyMethod(typeof(GameMenuPatches), nameof(GameMenuPatches.GameMenuPatch))
|
||||
postfix: new HarmonyMethod(typeof(GameMenuPatch), nameof(GameMenuPatch.DrawPatch))
|
||||
);
|
||||
|
||||
harmony.Patch(
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
using StardewValley;
|
||||
using StardewValley.Menus;
|
||||
using StardewValley.Objects;
|
||||
|
||||
namespace stardew_access.Patches
|
||||
{
|
||||
internal class GameMenuPatches
|
||||
internal class GameMenuPatch
|
||||
{
|
||||
internal static string gameMenuQueryKey = "";
|
||||
|
||||
internal static void GameMenuPatch(GameMenu __instance)
|
||||
internal static void DrawPatch(GameMenu __instance)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -38,5 +37,10 @@ namespace stardew_access.Patches
|
|||
MainClass.ErrorLog($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Cleanup()
|
||||
{
|
||||
gameMenuQueryKey = "";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,7 +33,7 @@ namespace stardew_access.Patches
|
|||
}
|
||||
else if (menu is GameMenu)
|
||||
{
|
||||
GameMenuPatches.gameMenuQueryKey = "";
|
||||
GameMenuPatch.Cleanup();
|
||||
ExitPagePatch.Cleanup();
|
||||
OptionsPagePatch.Cleanup();
|
||||
SocialPagePatch.Cleanup();
|
||||
|
|
Loading…
Reference in New Issue