Skip to content

Commit adda18e

Browse files
authored
Merge pull request #1981 from VT-14/Node-Filter-Fix-and-Upgrade
Fix and Upgrade Routing Node Amount Text Box
2 parents 660a4aa + 4251bd0 commit adda18e

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/main/java/wayoftime/bloodmagic/client/screens/ScreenFilter.java

+13-3
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,20 @@ public boolean mouseClicked(double mouseX, double mouseY, int mouseButton)
221221
{
222222
boolean testBool = super.mouseClicked(mouseX, mouseY, mouseButton);
223223

224-
if (this.textBox.mouseClicked(mouseX, mouseY, mouseButton))
225-
{
226-
return true;
224+
if (container.lastGhostSlotClicked != -1) { // Text box only selectable if a ghost slot has been clicked.
225+
if (this.textBox.mouseClicked(mouseX, mouseY, mouseButton)) { // Left-Clicked
226+
this.textBox.setFocused(true);
227+
return true;
228+
}
229+
if (this.textBox.isMouseOver(mouseX, mouseY) && mouseButton == 1) // Right-Clicked
230+
{
231+
this.textBox.setValue("");
232+
setValueOfGhostItemInSlot(container.lastGhostSlotClicked, 0);
233+
this.textBox.setFocused(true);
234+
return true;
235+
}
227236
}
237+
this.textBox.setFocused(false);
228238

229239
if (container.lastGhostSlotClicked != -1)
230240
{

0 commit comments

Comments
 (0)