aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/core/gui/machine
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-06-16 03:59:47 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-06-16 03:59:47 +1000
commit51d5db94cfafac652a05f6f121ec2521d62aaf5c (patch)
tree8e622e427fa6416b5ca508ed4deb8e10e783f9d1 /src/Java/miscutil/core/gui/machine
parentd3f4786befad33f4ec77723bf4470d05f9f862ec (diff)
downloadGT5-Unofficial-51d5db94cfafac652a05f6f121ec2521d62aaf5c.tar.gz
GT5-Unofficial-51d5db94cfafac652a05f6f121ec2521d62aaf5c.tar.bz2
GT5-Unofficial-51d5db94cfafac652a05f6f121ec2521d62aaf5c.zip
Done a lot of work on the NFHG.
Also did some more refactoring beforehand.
Diffstat (limited to 'src/Java/miscutil/core/gui/machine')
-rw-r--r--src/Java/miscutil/core/gui/machine/GUI_NHG.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/Java/miscutil/core/gui/machine/GUI_NHG.java b/src/Java/miscutil/core/gui/machine/GUI_NHG.java
new file mode 100644
index 0000000000..6078a5ad00
--- /dev/null
+++ b/src/Java/miscutil/core/gui/machine/GUI_NHG.java
@@ -0,0 +1,48 @@
+package miscutil.core.gui.machine;
+
+import miscutil.core.container.Container_NHG;
+import miscutil.core.lib.CORE;
+import miscutil.core.tileentities.TileEntityNHG;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.resources.I18n;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.util.ResourceLocation;
+
+import org.lwjgl.opengl.GL11;
+
+public class GUI_NHG extends GuiContainer
+{
+ private ResourceLocation texture = new ResourceLocation(CORE.MODID, "textures/gui/helium_collector_gui_12.png");
+
+ private InventoryPlayer inventory;
+ private TileEntityNHG te;
+
+ public GUI_NHG(TileEntityNHG te, EntityPlayer player)
+ {
+ super(new Container_NHG(te, player));
+ inventory = player.inventory;
+ this.te = te;
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
+ {
+ Minecraft.getMinecraft().renderEngine.bindTexture(texture);
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ int x = (width - xSize) / 2;
+ int y = (height - ySize) / 2;
+
+ drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+ fontRendererObj.drawString(I18n.format(te.getInventoryName()), (xSize / 2) - (fontRendererObj.getStringWidth(I18n.format(te.getInventoryName())) / 2), 6, 4210752, false);
+ fontRendererObj.drawString(I18n.format(inventory.getInventoryName()), 8, ySize - 96 + 2, 4210752);
+ }
+} \ No newline at end of file