Fix #347 Squeezer progress bar interferes with tank display

This commit is contained in:
mezz committed 2014-11-30 16:12:03 -08:00
1 parent 0b5a5bc34d
commit 9da092e6d4
2 files changed
+11 -9

No files matched your search

@@ -365,8 +365,7 @@ public abstract class GuiForestry<T extends TileForestry> 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<T extends TileForestry> 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);
@@ -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<MachineSqueezer> {
@@ -25,12 +24,11 @@ public class GuiSqueezer extends GuiForestryTitled<MachineSqueezer> {
}
@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();
}
}