Skip to content

UINode

interface UINode

A node in Archie's Compose-based UI tree, exposing the layout/render state a node needs regardless of its concrete representation. Implemented by LayoutNode, the tree node type produced by LayoutNodeApplier.

Inheritors

Properties

height

abstract var height: Int

This node's measured height, in pixels.

measurePolicy

Determines how this node measures and places its children.

modifier

abstract var modifier: Modifier

The chained Modifier applied to this node.

renderer

abstract var renderer: Renderer

Draws this node's own content (not its children) each frame.

renderState

abstract var renderState: String?

The net.kernelpanicsoft.archie.gui.composables.theme.TextureStates key a stateful Renderer most recently selected to draw (e.g. "focused", "clicked_and_focused"), or null for nodes that don't render theme-state-driven visuals.

Set by the Renderer itself, purely as a test hook - lets a client GameTest assert which visual state a component resolved to without pixel comparison. Not read by the framework.

width

abstract var width: Int

This node's measured width, in pixels.

x

abstract var x: Int

This node's placed x position, in pixels, relative to its parent.

y

abstract var y: Int

This node's placed y position, in pixels, relative to its parent.

Functions

render

abstract fun render(
    x: Int, 
    y: Int, 
    guiGraphics: GuiGraphics, 
    mouseX: Int, 
    mouseY: Int, 
    partialTick: Float
)

Renders this node and its subtree at the given absolute screen position.

Parameters

  • x: Absolute screen x position to render at.

  • y: Absolute screen y position to render at.

  • guiGraphics: The graphics context to draw with.

  • mouseX: Current mouse x position, in screen space.

  • mouseY: Current mouse y position, in screen space.

  • partialTick: Fractional tick time for this frame, for smooth animation.