diff --git a/Built-Broken-Lib b/Built-Broken-Lib index d240823fa..f38c26712 160000 --- a/Built-Broken-Lib +++ b/Built-Broken-Lib @@ -1 +1 @@ -Subproject commit d240823fa078ac48fa4a5bb846598666f7b5221f +Subproject commit f38c267121af147ff60b414d409424e0174ccac4 diff --git a/resources/assets/dark/textures/gui/gui_coder_icons.png b/resources/assets/dark/textures/gui/gui_coder_icons.png index e2c92e98b..d1fcd9bdf 100644 Binary files a/resources/assets/dark/textures/gui/gui_coder_icons.png and b/resources/assets/dark/textures/gui/gui_coder_icons.png differ diff --git a/src/dark/core/client/gui/GuiMachineContainer.java b/src/dark/core/client/gui/GuiMachineContainer.java index f6af03583..eff17ad54 100644 --- a/src/dark/core/client/gui/GuiMachineContainer.java +++ b/src/dark/core/client/gui/GuiMachineContainer.java @@ -28,6 +28,9 @@ public abstract class GuiMachineContainer extends GuiContainer protected ButtonIcon guiIcon = ButtonIcon.CHEST, guiIcon2 = ButtonIcon.PERSON, guiIcon3 = ButtonIcon.BLANK; protected String invName = "Home", invName2 = "2", invName3 = "3"; + protected int containerWidth; + protected int containerHeight; + public GuiMachineContainer(Object mod, Container container, InventoryPlayer inventoryPlayer, TileEntityMachine tileEntity) { super(container); @@ -37,24 +40,27 @@ public abstract class GuiMachineContainer extends GuiContainer this.mod = mod; } + @SuppressWarnings("unchecked") @Override public void initGui() { super.initGui(); this.buttonList.clear(); - + containerWidth = (this.width - this.xSize) / 2; + containerHeight = (this.height - this.ySize) / 2; if (guiID != -1) - this.buttonList.add(new GuiButtonImage(0, (this.width - this.xSize) / 2 - 22, (this.height - this.ySize) / 2 + 0, guiIcon)); + this.buttonList.add(new GuiButtonImage(0, containerWidth - 22, containerHeight + 0, guiIcon)); if (guiID2 != -1) - this.buttonList.add(new GuiButtonImage(1, (this.width - this.xSize) / 2 - 22, (this.height - this.ySize) / 2 + 22, guiIcon2)); + this.buttonList.add(new GuiButtonImage(1, containerWidth - 22, containerHeight + 22, guiIcon2)); if (guiID3 != -1) - this.buttonList.add(new GuiButtonImage(2, (this.width - this.xSize) / 2 - 22, (this.height - this.ySize) / 2 + 44, guiIcon3)); + this.buttonList.add(new GuiButtonImage(2, containerWidth - 22, containerHeight + 44, guiIcon3)); } @Override protected void actionPerformed(GuiButton button) { + super.actionPerformed(button); switch (button.id) { case 0: @@ -180,4 +186,14 @@ public abstract class GuiMachineContainer extends GuiContainer this.zLevel = 0.0F; } } + + public int getGuiTop() + { + return this.guiTop; + } + + public int getGuiLeft() + { + return this.guiLeft; + } } diff --git a/src/dark/core/network/PacketManagerEffects.java b/src/dark/core/network/PacketManagerEffects.java index 6e3374459..e27f64ec4 100644 --- a/src/dark/core/network/PacketManagerEffects.java +++ b/src/dark/core/network/PacketManagerEffects.java @@ -35,7 +35,6 @@ public class PacketManagerEffects implements IPacketManager { try { - System.out.println("Effect packet being handled"); World world = ((EntityPlayer) player).worldObj; String effectName = data.readUTF(); if (world != null) diff --git a/src/dark/core/prefab/invgui/GuiButtonImage.java b/src/dark/core/prefab/invgui/GuiButtonImage.java index 36dac524c..84a2a0fa1 100644 --- a/src/dark/core/prefab/invgui/GuiButtonImage.java +++ b/src/dark/core/prefab/invgui/GuiButtonImage.java @@ -42,7 +42,7 @@ public class GuiButtonImage extends GuiButton vv += this.height; } - this.drawTexturedModalRect(this.xPosition, this.yPosition, uu, vv, this.width, this.height); + this.drawTexturedModalRect(this.xPosition, this.yPosition, this.buttonIcon.uu, this.buttonIcon.vv, this.width, this.height); } } @@ -55,10 +55,10 @@ public class GuiButtonImage extends GuiButton public static enum ButtonIcon { PERSON(0, 0), - ARROW_LEFT(30, 0), - ARROW_RIGHT(20, 0), - ARROW_DOWN(30, 20), - ARROW_UP(20, 20), + ARROW_LEFT(30, 0, 10, 10), + ARROW_RIGHT(20, 0, 10, 10), + ARROW_DOWN(30, 20, 10, 10), + ARROW_UP(20, 20, 10, 10), CHEST(60, 0), LOCKED(80, 0), UNLOCKED(100, 0), @@ -73,8 +73,8 @@ public class GuiButtonImage extends GuiButton private ButtonIcon(int xx, int yy) { - this.vv = xx; - this.uu = yy; + this.vv = yy; + this.uu = xx; } private ButtonIcon(int xx, int yy, int cx, int cy)