So I'm drawing images to the hud using RenderGameOverlay. I want to shift around the normal gui to get better placement with my new additions, thus I am attempting to translate the vanilla gui based on what Element type the event is on.
Problem is I can't seem to change the position of the experience bar without changing every element even though I'm checking if the ElementType is Experience. I tried to use push and pop matrix but that didn't seem to help things.
Code:
public void renderGameOverlay(RenderGameOverlayEvent event) {
if(event.type == ElementType.EXPERIENCE) {
GL11.glTranslatef(0.0F, (float)(-7), 0.0F);
} else {
GL11.glTranslatef(0.0F, (float)(0), 0.0F);
}
}
Result:
http://i.imgur.com/MyVDs66.png
I'm probably not quite understanding something simple tbh =p