aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/gui
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-09-22 12:26:39 +1000
committerAlkalus <draknyte1@hotmail.com>2017-09-22 12:26:39 +1000
commitbc74aaa35b726899e5830425eb7a8fb5e54501e8 (patch)
tree5c00ace3c3a5444ab9c60e5d0fbb58ede33d4d67 /src/Java/gtPlusPlus/core/gui
parenteb0d3d0dee604e3eeff9c496b0bc4d374598a69e (diff)
downloadGT5-Unofficial-bc74aaa35b726899e5830425eb7a8fb5e54501e8.tar.gz
GT5-Unofficial-bc74aaa35b726899e5830425eb7a8fb5e54501e8.tar.bz2
GT5-Unofficial-bc74aaa35b726899e5830425eb7a8fb5e54501e8.zip
+ Added a framework for a Trade-o-Mat alike device.
Diffstat (limited to 'src/Java/gtPlusPlus/core/gui')
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java
new file mode 100644
index 0000000000..5b5a919291
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java
@@ -0,0 +1,67 @@
+package gtPlusPlus.core.gui.machine;
+
+import org.lwjgl.opengl.GL11;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.container.Container_ProjectTable;
+import gtPlusPlus.core.container.Container_TradeTable;
+import gtPlusPlus.core.container.Container_Workbench;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable;
+import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable;
+import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.util.ResourceLocation;
+
+@SideOnly(Side.CLIENT)
+public class GUI_TradeTable extends GuiContainer {
+
+ private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/ProjectTable.png");
+
+ public GUI_TradeTable(final InventoryPlayer player_inventory, final TileEntityTradeTable te){
+ super(new Container_TradeTable(player_inventory, te));
+ }
+
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(final int i, final int j){
+ //this.fontRendererObj.drawString(I18n.format("Workbench", new Object[0]), 28, 6, 4210752);
+ //this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
+
+ }
+
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){
+ GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ this.mc.renderEngine.bindTexture(craftingTableGuiTextures);
+ final int x = (this.width - this.xSize) / 2;
+ final int y = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
+ }
+
+
+ //This method is called when the Gui is first called!
+ @Override
+ public void initGui(){
+ //You have to add this line for the Gui to function properly!
+ super.initGui();
+
+ //The parameters of GuiButton are(id, x, y, width, height, text);
+ //this.buttonList.add(new GuiButton( 1, 367, 132, 18, 18, "X"));
+ //this.buttonList.add(new GuiButton( 2, 385, 132, 18, 18, "Y"));
+ //NOTE: the id always has to be different or else it might get called twice or never!
+
+ //Add any other buttons here too!
+ }
+
+ @Override
+ protected void actionPerformed(final GuiButton B){
+
+
+ }
+
+} \ No newline at end of file