aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/container/GUIContainer_ModularNuclearReactor.java
diff options
context:
space:
mode:
authorkekzdealer <kekzdealer@gmail.com>2019-10-12 00:51:41 +0200
committerkekzdealer <kekzdealer@gmail.com>2019-10-12 00:51:41 +0200
commit8dab80ff200998cdee40144c9855443cd17f366d (patch)
treedf4194255c4c3fc4b757b9a4f0265d26253b7873 /src/main/java/container/GUIContainer_ModularNuclearReactor.java
parent95ae4bcb0146fbccb6eaf0f0b3477050b8dde533 (diff)
downloadGT5-Unofficial-8dab80ff200998cdee40144c9855443cd17f366d.tar.gz
GT5-Unofficial-8dab80ff200998cdee40144c9855443cd17f366d.tar.bz2
GT5-Unofficial-8dab80ff200998cdee40144c9855443cd17f366d.zip
Made working UI base for nuclear reactor
Diffstat (limited to 'src/main/java/container/GUIContainer_ModularNuclearReactor.java')
-rw-r--r--src/main/java/container/GUIContainer_ModularNuclearReactor.java70
1 files changed, 30 insertions, 40 deletions
diff --git a/src/main/java/container/GUIContainer_ModularNuclearReactor.java b/src/main/java/container/GUIContainer_ModularNuclearReactor.java
index 9bea52badc..1333799a78 100644
--- a/src/main/java/container/GUIContainer_ModularNuclearReactor.java
+++ b/src/main/java/container/GUIContainer_ModularNuclearReactor.java
@@ -2,52 +2,42 @@ package container;
import org.lwjgl.opengl.GL11;
-import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import kekztech.KekzCore;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
-public class GUIContainer_ModularNuclearReactor extends GT_GUIContainerMetaTile_Machine {
+public class GUIContainer_ModularNuclearReactor extends GuiContainer {
- private final String resourceName;
- private final ResourceLocation texture;
-
- public GUIContainer_ModularNuclearReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity,
- String aName, String aTextureFile) {
-
- super(new Container_ModularNuclearReactor(aInventoryPlayer, aTileEntity), aTextureFile);
-
- this.resourceName = aTextureFile;
- this.texture = new ResourceLocation(KekzCore.MODID, "textures/gui/" + resourceName);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void initGui() {
- super.initGui();
-
- // The parameters of GuiButton are (id, x, y, width, height, text)
- super.buttonList.add(new GuiButton(1, 100, 200, 100, 20, "Hello"));
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
-
- Minecraft.getMinecraft().renderEngine.bindTexture(texture);
- GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
-
- final int x = (super.width - super.xSize);
- final int y = (super.height - super.ySize);
-
- super.drawTexturedModalRect(x, y, 0, 0, super.xSize, super.ySize);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
-
- }
+ private ResourceLocation texture = new ResourceLocation(KekzCore.MODID, "textures/gui/ReaktorGUI_background.png");
+
+ private InventoryPlayer inventory;
+ private IGregTechTileEntity te;
+
+ public GUIContainer_ModularNuclearReactor(IGregTechTileEntity te, EntityPlayer player)
+ {
+ super(new Container_ModularNuclearReactor(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);
+
+ drawTexturedModalRect(100, 100, 0, 0, 300, 200);
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+
+ }
}