Continue removing need for keeping track of guiWidth and guiHeight, as they are equal to guiLeft and guiTop

This commit is contained in:
pupnewfster committed 2019-07-08 11:47:46 -04:00
1 parent d6b27e95a2
commit 6d322024e6
47 files changed
+147 -157

No files matched your search

@@ -59,8 +59,8 @@ public class GuiFormulaicAssemblicator extends GuiMekanismTile<TileEntityFormula
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
fontRenderer.drawString(tileEntity.getName(), (xSize / 2) - (fontRenderer.getStringWidth(tileEntity.getName()) / 2), 6, 0x404040);
fontRenderer.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
int xAxis = mouseX - (width - xSize) / 2;
int yAxis = mouseY - (height - ySize) / 2;
int xAxis = mouseX - guiLeft;
int yAxis = mouseY - guiTop;
if (xAxis >= 44 && xAxis <= 60 && yAxis >= 75 && yAxis <= 91) {
drawHoveringText(LangUtils.localize("gui.fillEmpty"), xAxis, yAxis);
}
@@ -152,11 +152,9 @@ public class GuiFormulaicAssemblicator extends GuiMekanismTile<TileEntityFormula
@Override
protected void mouseClicked(int mouseX, int mouseY, int button) throws IOException {
super.mouseClicked(mouseX, mouseY, button);
if (button == 0) {
int xAxis = mouseX - (width - xSize) / 2;
int yAxis = mouseY - (height - ySize) / 2;
int xAxis = mouseX - guiLeft;
int yAxis = mouseY - guiTop;
if (!tileEntity.autoMode) {
if (xAxis >= 44 && xAxis <= 60 && yAxis >= 75 && yAxis <= 91) {
SoundHandler.playSound(SoundEvents.UI_BUTTON_CLICK);