render/immediate
Contains non-recommended rendering functions for immediate rendering
## USAGE NOT RECOMMENDED ##render.batched
for proper rendering unless you want to use minecraft font!
rect()
Renders a rectangle at the given position with the given boundaries and color
rect(x: float, y: float, width: float, height: float, color: int): void
Parameters
name | type | description |
---|---|---|
x | float | The x position |
y | float | The y position |
width | float | The width |
height | float | The height |
color | int | The color |
gradient_rect()
Renders a gradient rectangle at the given position with the given boundaries and colors
gradient_rect(x: float, y: float, width: float, height: float, from: int, to: int, vertical: boolean): void
Parameters
name | type | description |
---|---|---|
x | float | The x position |
y | float | The y position |
width | float | The width |
height | float | The height |
from | int | The from color |
to | int | The to color |
vertical | boolean | Whether the gradient should be vertical or horizontal |
rounded_rect()
Renders a rounded rectangle at the given position with the given boundaries, radius and color
rounded_rect(x: float, y: float, width: float, height: float, radius: float, color: int): void
Parameters
name | type | description |
---|---|---|
x | float | The x position |
y | float | The y position |
width | float | The width |
height | float | The height |
radius | float | The corner radius |
color | int | The color |
outline_rounded_rect()
Renders an outlined rounded rectangle at the given position with the given boundaries, radius, thickness and color
outline_rounded_rect(x: float, y: float, width: float, height: float, radius: float, thickness: float, color: int): void
Parameters
name | type | description |
---|---|---|
x | float | The x position |
y | float | The y position |
width | float | The width |
height | float | The height |
radius | float | The corner radius |
thickness | float | The thickness of the outline |
color | int | The color |
triangle()
Renders a triangle at the given position with the given color
triangle(top_x: float, top_y: float, left_x: float, left_y: float, right_x: float, right_y: float, color: int): void
Parameters
name | type | description |
---|---|---|
top_x | float | The top x of the triangle |
top_y | float | The top y of the triangle |
left_x | float | The left x of the triangle |
left_y | float | The left y of the triangle |
right_x | float | The right x of the triangle |
right_y | float | The right y of the triangle |
color | int | The color |
minecraft_text()
Renders a text with the minecraft font at the given position
minecraft_text(text: string, x: float, y: float, color: int, shadow: boolean): void
Parameters
name | type | description |
---|---|---|
text | string | The text to be rendered |
x | float | The x position |
y | float | The y position |
color | int | The color |
shadow | boolean | Whether to apply a drop-shadow or not |
text()
text(font_type: customfonttype, text: string, size: float, x: float, y: float, color: int, shadow: boolean): void
Parameters
name | type | description |
---|---|---|
font_type | customfonttype | The type of font to render the text with |
text | string | The text to be rendered |
size | float | The font size to use |
x | float | The x position |
y | float | The y position |
color | int | The color |
shadow | boolean | Whether to apply a drop-shadow or not |