mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
47 lines
1.8 KiB
Java
47 lines
1.8 KiB
Java
package mekanism.client.gui;
|
|
|
|
import mekanism.client.gui.element.GuiGasGauge;
|
|
import mekanism.client.gui.element.GuiGauge.Type;
|
|
import mekanism.common.inventory.container.ContainerNull;
|
|
import mekanism.common.tile.TileEntityAmbientAccumulator;
|
|
import mekanism.common.util.LangUtils;
|
|
import mekanism.common.util.MekanismUtils;
|
|
import mekanism.common.util.MekanismUtils.ResourceType;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public class GuiAmbientAccumulator extends GuiMekanism {
|
|
|
|
TileEntityAmbientAccumulator tileEntity;
|
|
|
|
public GuiAmbientAccumulator(EntityPlayer player, TileEntityAmbientAccumulator tile) {
|
|
super(tile, new ContainerNull(player, tile));
|
|
tileEntity = tile;
|
|
|
|
guiElements.add(new GuiGasGauge(() -> tileEntity.collectedGas, Type.WIDE, this,
|
|
MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 26, 16));
|
|
}
|
|
|
|
@Override
|
|
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
|
fontRenderer.drawString(tileEntity.getName(), 45, 6, 0x404040);
|
|
fontRenderer.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
|
|
|
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
|
}
|
|
|
|
@Override
|
|
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY) {
|
|
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"));
|
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
int guiWidth = (width - xSize) / 2;
|
|
int guiHeight = (height - ySize) / 2;
|
|
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
|
|
|
|
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
|
}
|
|
}
|