mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Continue removing need for keeping track of guiWidth and guiHeight, as they are equal to guiLeft and guiTop
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user