From 52c8b6e3e3be46d2a11239cb3145d7bc8e5075c9 Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Khan Date: Tue, 23 Aug 2022 08:57:34 +0530 Subject: [PATCH] Reverted back to using escape key --- stardew-access/Patches/MenuPatches.cs | 4 ++-- stardew-access/Patches/TitleMenuPatches.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stardew-access/Patches/MenuPatches.cs b/stardew-access/Patches/MenuPatches.cs index 40c98bf..993d580 100644 --- a/stardew-access/Patches/MenuPatches.cs +++ b/stardew-access/Patches/MenuPatches.cs @@ -472,7 +472,7 @@ namespace stardew_access.Patches { string toSpeak = ""; int x = Game1.getMouseX(true), y = Game1.getMouseY(true); // Mouse x and y position - bool isEnterPressed = Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Enter); // For escaping/unselecting from the animal name text box + bool isEscPressed = Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape); // For escaping/unselecting from the animal name text box if (firstTimeInNamingMenu) { @@ -485,7 +485,7 @@ namespace stardew_access.Patches ___textBox.Update(); toSpeak = ___textBox.Text; - if (isEnterPressed) + if (isEscPressed) { ___textBox.Selected = false; } diff --git a/stardew-access/Patches/TitleMenuPatches.cs b/stardew-access/Patches/TitleMenuPatches.cs index 39f3387..3873cf3 100644 --- a/stardew-access/Patches/TitleMenuPatches.cs +++ b/stardew-access/Patches/TitleMenuPatches.cs @@ -247,7 +247,7 @@ namespace stardew_access.Patches { try { - bool isEnterPressed = Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Enter); // For escaping/unselecting from the animal name text box + bool isEscPressed = Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape); // For escaping/unselecting from the animal name text box string toSpeak = " "; string currentPetName = getCurrentPetName(); @@ -255,7 +255,7 @@ namespace stardew_access.Patches { toSpeak = ___nameBox.Text; - if (isEnterPressed) + if (isEscPressed) { ___nameBox.Selected = false; } @@ -264,7 +264,7 @@ namespace stardew_access.Patches { toSpeak = ___farmnameBox.Text; - if (isEnterPressed) + if (isEscPressed) { ___farmnameBox.Selected = false; } @@ -273,7 +273,7 @@ namespace stardew_access.Patches { toSpeak = ___favThingBox.Text; - if (isEnterPressed) + if (isEscPressed) { ___favThingBox.Selected = false; }