    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import net.minecraft.client.Minecraft;
    006    import org.lwjgl.opengl.GL11;
    007
    008    @SideOnly(Side.CLIENT)
    009    public class GuiButtonMerchant extends GuiButton
    010    {
    011        private final boolean field_73749_j;
    012
    013        public GuiButtonMerchant(int par1, int par2, int par3, boolean par4)
    014        {
    015            super(par1, par2, par3, 12, 19, "");
    016            this.field_73749_j = par4;
    017        }
    018
    019        /**
    020         * Draws this button to the screen.
    021         */
    022        public void drawButton(Minecraft par1Minecraft, int par2, int par3)
    023        {
    024            if (this.drawButton)
    025            {
    026                GL11.glBindTexture(GL11.GL_TEXTURE_2D, par1Minecraft.renderEngine.getTexture("/gui/trading.png"));
    027                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    028                boolean var4 = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
    029                int var5 = 0;
    030                int var6 = 176;
    031
    032                if (!this.enabled)
    033                {
    034                    var6 += this.width * 2;
    035                }
    036                else if (var4)
    037                {
    038                    var6 += this.width;
    039                }
    040
    041                if (!this.field_73749_j)
    042                {
    043                    var5 += this.height;
    044                }
    045
    046                this.drawTexturedModalRect(this.xPosition, this.yPosition, var6, var5, this.width, this.height);
    047            }
    048        }
    049    }