Fixed bug for more than 1 text boxes in a menu
In this bug, if there were amore than 1 text boxes, then the textBoxQuery was resets to ' ' even if a text box is selected because of the other unselected text boxesmaster
parent
5296c4cabe
commit
e595a03be6
|
@ -8,21 +8,20 @@ namespace stardew_access.Patches
|
|||
{
|
||||
try
|
||||
{
|
||||
bool isEscPressed = StardewValley.Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape); // For escaping/unselecting from the animal name text box
|
||||
string toSpeak = " ";
|
||||
if (__instance.Selected)
|
||||
{
|
||||
MainClass.isAnyTextBoxActive = true;
|
||||
toSpeak = __instance.Text;
|
||||
|
||||
if (isEscPressed)
|
||||
{
|
||||
__instance.Selected = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!__instance.Selected)
|
||||
{
|
||||
MainClass.isAnyTextBoxActive = false;
|
||||
return;
|
||||
}
|
||||
|
||||
MainClass.isAnyTextBoxActive = true;
|
||||
|
||||
bool isEscPressed = StardewValley.Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape);
|
||||
string toSpeak = __instance.Text;
|
||||
|
||||
if (isEscPressed)
|
||||
{
|
||||
__instance.Selected = false;
|
||||
}
|
||||
|
||||
if (textBoxQuery != toSpeak)
|
||||
|
|
Loading…
Reference in New Issue