/** 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(); }
@Override public void customRender(int delta) { // this.isillegalyouknow(); GL11.glPushMatrix(); Util2D.drawTexturedQuad( background, startX + offset - 10 - ((travelDirection) ? text.length() * 10 : 0), startY - 10, text.length() * 32 + 40, 20); Util2D.renderText( text, startX + offset - ((travelDirection) ? text.length() * 10 : 0), startY + 10); GL11.glPopMatrix(); boolean done = computeOffset(); if (done) { if (timeout <= 0) { close(); } else { timeout -= 1; } } }
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(); }