From 014e6cc50c9ccdb0473a0420116f9182e246b62c Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Fri, 29 Nov 2013 20:39:16 -0500 Subject: [PATCH] . --- ...Seifert's conflicted copy 2013-11-29).java | 87 ------------------- 1 file changed, 87 deletions(-) delete mode 100644 src/dark/core/prefab/invgui/GuiButtonImage (Robert Seifert's conflicted copy 2013-11-29).java diff --git a/src/dark/core/prefab/invgui/GuiButtonImage (Robert Seifert's conflicted copy 2013-11-29).java b/src/dark/core/prefab/invgui/GuiButtonImage (Robert Seifert's conflicted copy 2013-11-29).java deleted file mode 100644 index e45168b72..000000000 --- a/src/dark/core/prefab/invgui/GuiButtonImage (Robert Seifert's conflicted copy 2013-11-29).java +++ /dev/null @@ -1,87 +0,0 @@ -package dark.core.prefab.invgui; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.client.FMLClientHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import dark.core.common.DarkMain; - -@SideOnly(Side.CLIENT) -public class GuiButtonImage extends GuiButton -{ - public static final ResourceLocation TEXTURE = new ResourceLocation(DarkMain.getInstance().DOMAIN, DarkMain.GUI_DIRECTORY + "gui_button.png"); - - private ButtonIcon buttonIcon = ButtonIcon.BLANK; - - public GuiButtonImage(int buttonID, int xx, int yy, ButtonIcon icon) - { - super(buttonID, xx, yy, 20, 20, ""); - this.buttonIcon = icon; - this.width = icon.sizeX; - this.height = icon.sizeY; - } - - /** Draws this button to the screen. */ - @Override - public void drawButton(Minecraft mc, int width, int hight) - { - if (this.drawButton) - { - FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - boolean hovering = width >= this.xPosition && hight >= this.yPosition && width < this.xPosition + this.width && hight < this.yPosition + this.height; - int vv = buttonIcon.vv; - int uu = buttonIcon.uu; - if (hovering) - { - vv += this.height; - } - - this.drawTexturedModalRect(this.xPosition, this.yPosition, uu, vv, this.width, this.height); - } - } - - /** Checks to see if the x and y coords are intersecting with the button. */ - public boolean isIntersect(int x, int y) - { - return x >= this.xPosition && y >= this.yPosition && x < this.xPosition + this.width && y < this.yPosition + this.height; - } - - public static enum ButtonIcon - { - PERSON(0, 0), - 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), - BLANK(120, 0), - RED_ON(140, 0), - RED_OFF(160, 0), - FURNACE_OFF(180, 0), - FURNACE_ON(200, 0); - - int vv, uu; - int sizeX = 20, sizeY = 20; - - private ButtonIcon(int xx, int yy) - { - this.vv = xx; - this.uu = yy; - } - - private ButtonIcon(int xx, int yy, int cx, int cy) - { - this(xx, yy); - this.sizeX = cx; - this.sizeY = cy; - } - } -} \ No newline at end of file