summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/container/Page.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2014-04-01 22:33:40 +0300
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2014-04-01 22:33:40 +0300
commiteb32c0b97d9f3dddace4ffb1a4eb0617e4f63225 (patch)
tree6523cdae9112ab995c8397d5d7a1d6bf4dc2a471 /common/darkknight/jewelrycraft/container/Page.java
parent9d0d74a3ba0aeca9f1130d1228fa4b9ef08d19d6 (diff)
Yaay! I finished another update :)
Diffstat (limited to 'common/darkknight/jewelrycraft/container/Page.java')
-rw-r--r--common/darkknight/jewelrycraft/container/Page.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/common/darkknight/jewelrycraft/container/Page.java b/common/darkknight/jewelrycraft/container/Page.java
index f3b9622..7837b8d 100644
--- a/common/darkknight/jewelrycraft/container/Page.java
+++ b/common/darkknight/jewelrycraft/container/Page.java
@@ -16,7 +16,7 @@ public class Page
y+=5;
gui.getFont().drawString("§1§n" + items.get(0).getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(items.get(0).getDisplayName())/2) - 10, y - 2, 0);
GL11.glColor4f(1, 1, 1, 1);
- Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("jewelrycraft", "textures/gui/guidePageFlip1.png"));
+ Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("jewelrycraft", "textures/gui/guidePageFlip.png"));
ArrayList<String> name = new ArrayList<String>();
if(isSmall){
gui.drawTexturedModalRect(x, y + 10, 145, 54, 111, 46);
@@ -28,24 +28,28 @@ public class Page
name.add(items.get(1).getDisplayName());
if(mouseX >= x && mouseX <= x + 16 && mouseY >= y + 10 && mouseY <= y + 26) gui.drawHoverString(name, x - 8, y + 10);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 2 && items.get(2) != null){
gui.renderItem(items.get(2), x + 30, y + 16 + 10, 30f);
name.add(items.get(2).getDisplayName());
if(mouseX >= x + 20 && mouseX <= x + 16 + 20 && mouseY >= y + 10 && mouseY <= y + 26) gui.drawHoverString(name, x + 15, y + 10);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 3 && items.get(3) != null){
gui.renderItem(items.get(3), x + 8, y + 40 + 10, 30f);
name.add(items.get(3).getDisplayName());
if(mouseX >= x && mouseX <= x + 16 && mouseY >= y + 36 && mouseY <= y + 36 + 16) gui.drawHoverString(name, x - 8, y + 35);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 4 && items.get(4) != null){
gui.renderItem(items.get(4), x + 30, y + 40 + 10, 30f);
name.add(items.get(4).getDisplayName());
if(mouseX >= x + 20 && mouseX <= x + 16 + 20 && mouseY >= y + 36 && mouseY <= y + 36 + 16) gui.drawHoverString(name, x + 15, y + 35);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
for(int i = 0; i < text.size(); i++) gui.getFont().drawString(text.get(i), x, y + 55 + i*12, 0);
}
@@ -57,54 +61,63 @@ public class Page
name.add(items.get(1).getDisplayName());
if(mouseX >= x && mouseX <= x + 16 && mouseY >= y + 10 && mouseY <= y + 26) gui.drawHoverString(name, x + 8, y + 10);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 2 && items.get(2) != null){
gui.renderItem(items.get(2), x + 28, y + 20, 30f);
name.add(items.get(2).getDisplayName());
if(mouseX >= x + 20 && mouseX <= x + 16 + 20 && mouseY >= y + 10 && mouseY <= y + 26) gui.drawHoverString(name, x + 28, y + 10);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 3 && items.get(3) != null){
gui.renderItem(items.get(3), x + 45, y + 20, 30f);
name.add(items.get(3).getDisplayName());
if(mouseX >= x + 40 && mouseX <= x + 16 + 40 && mouseY >= y + 10 && mouseY <= y + 26) gui.drawHoverString(name, x + 45, y + 10);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 4 && items.get(4) != null){
gui.renderItem(items.get(4), x + 8, y + 37, 30f);
name.add(items.get(4).getDisplayName());
if(mouseX >= x && mouseX <= x + 16 && mouseY >= y + 27 && mouseY <= y + 27 + 16) gui.drawHoverString(name, x + 8, y + 27);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 5 && items.get(5) != null){
gui.renderItem(items.get(5), x + 28, y + 37, 30f);
name.add(items.get(5).getDisplayName());
if(mouseX >= x + 20 && mouseX <= x + 16 + 20 && mouseY >= y + 27 && mouseY <= y + 27 + 16) gui.drawHoverString(name, x + 28, y + 27);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 6 && items.get(6) != null){
gui.renderItem(items.get(6), x + 45, y + 37, 30f);
name.add(items.get(6).getDisplayName());
if(mouseX >= x + 40 && mouseX <= x + 16 + 40 && mouseY >= y + 27 && mouseY <= y + 27 + 16) gui.drawHoverString(name, x + 45, y + 27);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 7 && items.get(7) != null){
gui.renderItem(items.get(7), x + 8, y + 57, 30f);
name.add(items.get(7).getDisplayName());
if(mouseX >= x && mouseX <= x + 16 && mouseY >= y + 47 && mouseY <= y + 47 + 16) gui.drawHoverString(name, x + 8, y + 47);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 8 && items.get(8) != null){
gui.renderItem(items.get(8), x + 28, y + 57, 30f);
name.add(items.get(8).getDisplayName());
if(mouseX >= x + 20 && mouseX <= x + 16 + 20 && mouseY >= y + 47 && mouseY <= y + 47 + 16) gui.drawHoverString(name, x + 28, y + 47);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
if(items.size() > 9 && items.get(9) != null){
gui.renderItem(items.get(9), x + 45, y + 57, 30f);
name.add(items.get(9).getDisplayName());
if(mouseX >= x + 40 && mouseX <= x + 16 + 40 && mouseY >= y + 47 && mouseY <= y + 47 + 16) gui.drawHoverString(name, x + 45, y + 47);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
}
for(int i = 0; i < text.size(); i++) gui.getFont().drawString(text.get(i), x, y + 62 + i*12, 0);
GL11.glColor4f(1, 1, 1, 1);
@@ -116,14 +129,14 @@ public class Page
ArrayList<String> name = new ArrayList<String>();
gui.getFont().drawString("§1§n" + items.get(1).getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(items.get(0).getDisplayName())/2), y + 2, 0);
GL11.glColor4f(1, 1, 1, 1);
- Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("jewelrycraft", "textures/gui/guidePageFlip1" +
- ".png"));
+ Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("jewelrycraft", "textures/gui/guidePageFlip" + ".png"));
gui.drawTexturedModalRect(x, y + 10, 145, 100, 111, 46);
gui.renderItem(items.get(0), x + 13, y + 20 + 10, 50f);
name.add(items.get(0).getDisplayName());
if(mouseX >= x && mouseX <= x + 20 && mouseY >= y + 20 && mouseY <= y + 20 + 16) gui.drawHoverString(name, x, y + 20);
name.removeAll(name);
+ GL11.glDisable(GL11.GL_LIGHTING);
gui.renderItem(items.get(1), x + 77, y + 28 + 10, 50f);
@@ -140,12 +153,12 @@ public class Page
for(int i = 0; i < text.size(); i++) gui.getFont().drawString(text.get(i), x, y + 30 + i*12, 0);
}
- public static void addImageTextPage(GuiGuide gui, int x, int y, ItemStack item, ArrayList<String> text, float size, int txtX, int txtY)
+ public static void addImageTextPage(GuiGuide gui, int x, int y, ItemStack item, ArrayList<String> text, float size, int txtX, int txtY, boolean showName, int imgX, int imgY)
{
y+=5;
- gui.getFont().drawString("§1§n" + item.getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(item.getDisplayName())/2) - 10, y + 2, 0);
+ if(showName) gui.getFont().drawString("§1§n" + item.getDisplayName(), x + Math.abs(70 - gui.getFont().getStringWidth(item.getDisplayName())/2) - 10, y + 2, 0);
GL11.glColor4f(1, 1, 1, 1);
- gui.renderItem(item, x + 13, y + 18, size);
+ gui.renderItem(item, x + 13 + imgX, y + 18 + imgY, size);
for(int i = 0; i < text.size(); i++) gui.getFont().drawString(text.get(i), x + txtX, y + 30 + txtY + i*12, 0);
}