/** Draws the entity on the screen. */ public void draw() { if (texture == null) { return; } GL11.glPushMatrix(); if (hitbox != null && drawHitboxes) { Util2D.drawRect(hitbox.startX, hitbox.xLength, hitbox.startY, hitbox.yLength); } Util2D.drawTexturedQuad(texture, (int) x, (int) y); GL11.glPopMatrix(); }
private void renderButton(boolean selected) { if (!selected) { if (offset > 0) { offset -= 1; } } else { if (offset < maxOffset) { offset += 1; } } GL11.glPushMatrix(); EnumColour.BLUE.bind(); Util2D.drawRect(x - offset, length + (offset * 2), y - offset, 50 + (offset * 2)); EnumColour.unbind(); fontRenderer.renderString(text, x + 3, y + 12); GL11.glPopMatrix(); }