summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-03-23 14:51:06 +0000
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-03-23 14:51:06 +0000
commit6312636fd9a4d0f56dc7c9ff474a99d879bcb4e9 (patch)
treee3279753210bfb169a00cd3f146a80baf624150e /src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java
parente86949a1ad3269ec66c9de65e2c92f5e66251411 (diff)
Reworked the whole repo.
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java')
-rw-r--r--src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java b/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java
new file mode 100644
index 0000000..0f8e59a
--- /dev/null
+++ b/src/main/java/darkknight/jewelrycraft/client/GuiJewelry.java
@@ -0,0 +1,69 @@
+package darkknight.jewelrycraft.client;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.container.ContainerJewelryTab;
+import darkknight.jewelrycraft.container.JewelryInventory;
+import darkknight.jewelrycraft.events.KeyBindings;
+
+public class GuiJewelry extends GuiContainer
+{
+ ResourceLocation texture;
+
+ /**
+ * @param containerJewelryTab
+ * @param texture
+ */
+ public GuiJewelry(ContainerJewelryTab containerJewelryTab, ResourceLocation texture)
+ {
+ super(containerJewelryTab);
+ xSize = 194;
+ ySize = 166;
+ this.texture = texture;
+ }
+
+ /**
+ * @param f
+ * @param mouseX
+ * @param mouseY
+ */
+ @Override
+ public void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
+ {
+ GL11.glColor3f(1, 1, 1);
+ Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
+ drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
+ }
+
+ /**
+ * @param mouseX
+ * @param mouseY
+ */
+ @Override
+ public void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
+ {}
+
+ /**
+ * @param charecter
+ * @param key
+ */
+ @Override
+ protected void keyTyped(char charecter, int key)
+ {
+ super.keyTyped(charecter, key);
+ if (key == KeyBindings.inventory.getKeyCode()) mc.thePlayer.closeScreen();
+ }
+
+ @Override
+ public void initGui ()
+ {
+ super.initGui();
+ int cornerX = guiLeft;
+ int cornerY = guiTop;
+ this.buttonList.clear();
+ TabRegistry.updateTabValues(cornerX, cornerY, TabJewelry.class);
+ TabRegistry.addTabsToList(this.buttonList);
+ }
+}