Change render for disabled image buttons when they are disabled.
This commit is contained in:
parent
4cfe61de26
commit
f5f93dd01e
1 changed files with 11 additions and 2 deletions
|
@ -201,7 +201,11 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||||
GL11.glTranslatef( this.xPosition, this.yPosition, 0.0F );
|
GL11.glTranslatef( this.xPosition, this.yPosition, 0.0F );
|
||||||
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
||||||
|
|
||||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
if ( enabled )
|
||||||
|
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
|
else
|
||||||
|
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||||
|
|
||||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
||||||
&& par3 < this.yPosition + this.height;
|
&& par3 < this.yPosition + this.height;
|
||||||
|
@ -217,7 +221,11 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
if ( enabled )
|
||||||
|
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
|
else
|
||||||
|
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||||
|
|
||||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
||||||
&& par3 < this.yPosition + this.height;
|
&& par3 < this.yPosition + this.height;
|
||||||
|
@ -230,6 +238,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||||
this.mouseDragged( par1Minecraft, par2, par3 );
|
this.mouseDragged( par1Minecraft, par2, par3 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getIconIndex()
|
private int getIconIndex()
|
||||||
|
|
Loading…
Add table
Reference in a new issue