HUD Scripting
Render Pipeline
hudManager
Callbacks
// Called every frame to draw your element's content.
// x, y, scale are passed in directly so you don't need to call hudManager.x() etc. inside the callback.
hudManager.onRender((x, y, scale) => {
// use hudRenderer here
});
// Returns an array of RoundedRect shapes drawn as the blurred background.
hudManager.onBackground(() => {
return [new RoundedRect(hudManager.x(), hudManager.y(), width, height, 4 * hudManager.scale())];
});
// Returns the pixel width of your element. Used by the HUD editor for snapping.
hudManager.onWidth(() => 160);
// Returns the pixel height of your element.
hudManager.onHeight(() => 40);Position & Layout
Function
Returns
Description
hudRenderer
Text
Rectangles
Circles
Items
RoundedRect
Minimal Example
Tips
See Also
Last updated