Reverted back to using escape key

master
Mohammad Shoaib Khan 2022-08-23 08:57:34 +05:30
parent 9afeb7f778
commit 52c8b6e3e3
2 changed files with 6 additions and 6 deletions

View File

@ -472,7 +472,7 @@ namespace stardew_access.Patches
{ {
string toSpeak = ""; string toSpeak = "";
int x = Game1.getMouseX(true), y = Game1.getMouseY(true); // Mouse x and y position 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) if (firstTimeInNamingMenu)
{ {
@ -485,7 +485,7 @@ namespace stardew_access.Patches
___textBox.Update(); ___textBox.Update();
toSpeak = ___textBox.Text; toSpeak = ___textBox.Text;
if (isEnterPressed) if (isEscPressed)
{ {
___textBox.Selected = false; ___textBox.Selected = false;
} }

View File

@ -247,7 +247,7 @@ namespace stardew_access.Patches
{ {
try 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 toSpeak = " ";
string currentPetName = getCurrentPetName(); string currentPetName = getCurrentPetName();
@ -255,7 +255,7 @@ namespace stardew_access.Patches
{ {
toSpeak = ___nameBox.Text; toSpeak = ___nameBox.Text;
if (isEnterPressed) if (isEscPressed)
{ {
___nameBox.Selected = false; ___nameBox.Selected = false;
} }
@ -264,7 +264,7 @@ namespace stardew_access.Patches
{ {
toSpeak = ___farmnameBox.Text; toSpeak = ___farmnameBox.Text;
if (isEnterPressed) if (isEscPressed)
{ {
___farmnameBox.Selected = false; ___farmnameBox.Selected = false;
} }
@ -273,7 +273,7 @@ namespace stardew_access.Patches
{ {
toSpeak = ___favThingBox.Text; toSpeak = ___favThingBox.Text;
if (isEnterPressed) if (isEscPressed)
{ {
___favThingBox.Selected = false; ___favThingBox.Selected = false;
} }