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,22 +8,21 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool isEscPressed = StardewValley.Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape); // For escaping/unselecting from the animal name text box
|
if (!__instance.Selected)
|
||||||
string toSpeak = " ";
|
|
||||||
if (__instance.Selected)
|
|
||||||
{
|
{
|
||||||
|
MainClass.isAnyTextBoxActive = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MainClass.isAnyTextBoxActive = true;
|
MainClass.isAnyTextBoxActive = true;
|
||||||
toSpeak = __instance.Text;
|
|
||||||
|
bool isEscPressed = StardewValley.Game1.input.GetKeyboardState().IsKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape);
|
||||||
|
string toSpeak = __instance.Text;
|
||||||
|
|
||||||
if (isEscPressed)
|
if (isEscPressed)
|
||||||
{
|
{
|
||||||
__instance.Selected = false;
|
__instance.Selected = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainClass.isAnyTextBoxActive = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (textBoxQuery != toSpeak)
|
if (textBoxQuery != toSpeak)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue