Skip to content

Commit

Permalink
Merge pull request #1981 from VT-14/Node-Filter-Fix-and-Upgrade
Browse files Browse the repository at this point in the history
Fix and Upgrade Routing Node Amount Text Box
  • Loading branch information
WayofTime committed Oct 2, 2023
2 parents 660a4aa + 4251bd0 commit adda18e
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,20 @@ public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)
{
boolean testBool = super.mouseClicked(mouseX, mouseY, mouseButton);

if (this.textBox.mouseClicked(mouseX, mouseY, mouseButton))
{
return true;
if (container.lastGhostSlotClicked != -1) { // Text box only selectable if a ghost slot has been clicked.
if (this.textBox.mouseClicked(mouseX, mouseY, mouseButton)) { // Left-Clicked
this.textBox.setFocused(true);
return true;
}
if (this.textBox.isMouseOver(mouseX, mouseY) && mouseButton == 1) // Right-Clicked
{
this.textBox.setValue("");
setValueOfGhostItemInSlot(container.lastGhostSlotClicked, 0);
this.textBox.setFocused(true);
return true;
}
}
this.textBox.setFocused(false);

if (container.lastGhostSlotClicked != -1)
{
Expand Down

0 comments on commit adda18e

Please sign in to comment.