Skip to content

Commit

Permalink
Fix not being able to click on side buttons while using flipped mouse…
Browse files Browse the repository at this point in the history
… controls. (#4297)
  • Loading branch information
alexbegt committed Apr 4, 2021
1 parent 65fd2dd commit 1660389
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ public TinkerStationScreen(TinkerStationContainer container, PlayerInventory pla
SlotInformation slotInformation = SlotInformationLoader.get(Util.getResource("repair_" + max));
this.currentData = slotInformation;
this.activeSlots = Math.min(slotInformation.getPoints().size(), max);

this.passEvents = false;
}

@Override
Expand Down Expand Up @@ -496,6 +498,10 @@ public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) {
if (this.modifierInfo.handleMouseClicked(mouseX, mouseY, mouseButton)) {
return false;
}

if(this.buttonsScreen.handleMouseClicked(mouseX, mouseY, mouseButton)) {
return false;
}

return this.textField.mouseClicked(mouseX, mouseY, mouseButton) || super.mouseClicked(mouseX, mouseY, mouseButton);
}
Expand Down Expand Up @@ -536,6 +542,10 @@ public boolean mouseReleased(double mouseX, double mouseY, int state) {
return false;
}

if (this.buttonsScreen.handleMouseReleased(mouseX, mouseY, state)) {
return false;
}

return super.mouseReleased(mouseX, mouseY, state);
}

Expand Down

0 comments on commit 1660389

Please sign in to comment.