Hi, all. I'm starting a mod and figured I'd start relatively simple with a custom GUI that simply displays how to get started with the mod. All seems to be working well, except that the GuiButton is drawing oddly. It works, so it isn't disabled. I suspect I'm setting something wrong / should be resetting something in OpenGL, but right now I admit I'm cargo cult programming the OpenGL stuff - learning it properly is still on the todo list.
http://troglodytegames.com/images/ForgeGUIWeirdButtons.png shows how they look.
Full GUI class is at : http://pastebin.com/VM5m4F5n
I suspect it is in the drawscreen :
/**
* Draws the screen and all the components in it.
*/
public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(backgroundTexture);
this.drawTexturedModalRect( (this.width - 256) / 2, 0, 0, 0, 256, 256);
drawShapelessCrafting((this.width - 100) / 2, 180, LegendOfArtisansMod.legendarybookShapeless);
for (int k = 0; k < this.buttonList.size(); ++k)
{
((GuiButton)this.buttonList.get(k)).drawButton(this.mc, p_73863_1_, p_73863_2_);
}
for (int k = 0; k < this.labelList.size(); ++k)
{
((GuiLabel)this.labelList.get(k)).func_146159_a(this.mc, p_73863_1_, p_73863_2_);
}
}