Skip to content

Renderer

@Stable



interface Renderer

Defines the rendering behaviour of a LayoutNode.

Both render and renderAfterChildren have no-op defaults so implementors only override what they need.

Functions

render

open fun render(
    node: AUINode, 
    x: Int, 
    y: Int, 
    guiGraphics: GuiGraphics, 
    mouseX: Int, 
    mouseY: Int, 
    partialTick: Float
)

Called before the node's children are rendered.

Use this for backgrounds, borders, or content that should appear below children.

renderAfterChildren

open fun renderAfterChildren(
    node: AUINode, 
    x: Int, 
    y: Int, 
    guiGraphics: GuiGraphics, 
    mouseX: Int, 
    mouseY: Int, 
    partialTick: Float
)

Called after all children have been rendered.

Use this for overlays or post-process effects that should appear above children.