summaryrefslogtreecommitdiff
path: root/java/darkknight/jewelrycraft/client/GuiJewelry.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/darkknight/jewelrycraft/client/GuiJewelry.java')
-rw-r--r--java/darkknight/jewelrycraft/client/GuiJewelry.java41
1 files changed, 33 insertions, 8 deletions
diff --git a/java/darkknight/jewelrycraft/client/GuiJewelry.java b/java/darkknight/jewelrycraft/client/GuiJewelry.java
index bbc6236..1d31770 100644
--- a/java/darkknight/jewelrycraft/client/GuiJewelry.java
+++ b/java/darkknight/jewelrycraft/client/GuiJewelry.java
@@ -1,32 +1,57 @@
package darkknight.jewelrycraft.client;
-import org.lwjgl.opengl.GL11;
-
-import darkknight.jewelrycraft.container.ContainerJewelryTab;
-import darkknight.jewelrycraft.container.ContainerRingChest;
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.events.KeyBindings;
public class GuiJewelry extends GuiContainer
-{
- public GuiJewelry(ContainerJewelryTab containerJewelryTab)
+{
+ 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(new ResourceLocation("jewelrycraft", "textures/gui/jewelry_tab.png"));
+ 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();
}
}