UIRenderer

This page will go over the `UIRenderer` namespace

These functions are all meant to be used for rendering HUD components in a 2D situation. We do not recommend calling these when rendering in 3D.

filledBox(Entity entity, Color color): void

Draws a filled box around an entity, with the given color.

outlineBox(Entity entity, float thickness, Color color): void

Draws an outline box around an entity, with the given color.

rectangle(float x, float y, float width, float height, Color color): void

Draws a rectangle at the given coordinates.

rectangleBorder(float x, float y, float width, float height, float thickness, Color color): void

Draws a rectangle border at the given coodinates.

roundedRectangle(float x, float y, float width, float height, float radius, Color color): void

Draws a rounded rectangle with the given radius at the given coordinates

roundedRectangleBorder(float x, float y, float width, float height, float radius, float thickness, Color color): void

Draws a rounded rectangle border with the given radius and thickness at the given coordinates.

circle(float centerX, float centerY, float radius, Color color): void

Draws a circle around the given coordinates, with the given radius.

circleBorder(float centerX, float centerY, float radius, float thickness, Color color): void

Draws a circle border around the given coordinates, with the given radius and thickness.

remoteTexture(String url, float x, float y, float width, float height, float scale, float radius, Color color): void

Draws a texture fetched from a URL at the given coordinates with the given scale and radius.

text(String text, float x, float y, Color color): void

Draws the given text at the given coordinates.

textWidth(String text): float

Returns the text width of the given text.

textWidth(String text, float size): float

Returns the text width of the given text with the given size.

text(String text, float x, float y, Color color, float size): void

Draws the given text at the given coordinates with the given size.

scissor(float x, float, y, float width, float height, Function function): void

Creates a scissor box using our advanced scissor stack, any pixels drawn inside of the provided function will only be rendered on to the screen if they fit within the provided box.

Stacking scissor boxes is possible in breeze.

Last updated