From 9da092e6d4ae9fabfee7e5a80b5e6ee532ba4439 Mon Sep 17 00:00:00 2001 From: mezz Date: Sun, 30 Nov 2014 16:12:03 -0800 Subject: [PATCH] Fix #347 Squeezer progress bar interferes with tank display --- src/main/java/forestry/core/gui/GuiForestry.java | 8 ++++++-- src/main/java/forestry/factory/gui/GuiSqueezer.java | 12 +++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/java/forestry/core/gui/GuiForestry.java b/src/main/java/forestry/core/gui/GuiForestry.java index 2aa119094..d52dea0ff 100755 --- a/src/main/java/forestry/core/gui/GuiForestry.java +++ b/src/main/java/forestry/core/gui/GuiForestry.java @@ -365,8 +365,7 @@ public abstract class GuiForestry extends GuiContainer i OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240 / 1.0F, 240 / 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - ledgerManager.drawLedgers(); - widgetManager.drawWidgets(); + drawWidgets(); GL11.glPopMatrix(); GL11.glPopAttrib(); @@ -374,6 +373,11 @@ public abstract class GuiForestry extends GuiContainer i bindTexture(textureFile); } + protected void drawWidgets() { + ledgerManager.drawLedgers(); + widgetManager.drawWidgets(); + } + protected void bindTexture(ResourceLocation texturePath) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Proxies.common.bindTexture(texturePath); diff --git a/src/main/java/forestry/factory/gui/GuiSqueezer.java b/src/main/java/forestry/factory/gui/GuiSqueezer.java index 93797d6ec..6125885c1 100755 --- a/src/main/java/forestry/factory/gui/GuiSqueezer.java +++ b/src/main/java/forestry/factory/gui/GuiSqueezer.java @@ -10,12 +10,11 @@ ******************************************************************************/ package forestry.factory.gui; -import net.minecraft.entity.player.InventoryPlayer; - import forestry.core.config.Defaults; import forestry.core.gui.GuiForestryTitled; import forestry.core.gui.widgets.TankWidget; import forestry.factory.gadgets.MachineSqueezer; +import net.minecraft.entity.player.InventoryPlayer; public class GuiSqueezer extends GuiForestryTitled { @@ -25,12 +24,11 @@ public class GuiSqueezer extends GuiForestryTitled { } @Override - protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) { - super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY); - MachineSqueezer machine = tile; + protected void drawWidgets() { + int progress = tile.getProgressScaled(43); + drawTexturedModalRect(75, 20, 176, 60, 43 - progress, 18); - int progress = machine.getProgressScaled(43); - drawTexturedModalRect(guiLeft + 75, guiTop + 20, 176, 60, 43 - progress, 18); + super.drawWidgets(); } }