UiController

Code-behind for a .ui document. Subclass it, expose public properties for data bindings and public parameterless methods for element events (click="OnPlay" → OnPlay()). A UiRenderer discovers both automatically via Bind.

Properties

Document

(UiDocument): The document this controller is bound to.

Public Methods

OnUpdate

public virtual void OnUpdate(float deltaTime)

Called once per frame before the UI is built.

Parameters:

  • deltaTime (float): Seconds since the previous frame.

Q

public UiElement? Q(string name)

Finds a parsed element by name.

Parameters:

  • name (string): The element name.

Returns: UiElement?