Skip to content

UiManager labels need absolute positioning support #553

Description

@aram-devdocs

Problem

UiManager.CreateLabel() creates labels in a tree-based layout flow. There is no way to position labels at absolute screen coordinates (e.g., x: 18, y: 18 for a HUD overlay).

This means game HUD text that needs to be drawn at specific pixel positions over custom DrawQuad panels cannot use UiManager labels. The workaround is to use DrawText() directly, bypassing UiManager entirely.

Expected Behavior

UiManager should support absolute positioning for individual nodes, e.g.:

ulong nodeId = uiManager.CreateLabel("PAUSED");
uiManager.SetPosition(nodeId, 18f, 18f); // absolute screen coordinates

Or via a style/layout mode:

uiManager.SetLayoutMode(nodeId, LayoutMode.Absolute);
uiManager.SetPosition(nodeId, 18f, 18f);

Current Behavior

  • GoudUIPort.SetPosition() is a no-op because UiManager has no position API for individual nodes
  • GoudUIPort.SetVisible() is a no-op for the same reason (no show/hide per node)
  • Labels created via UiManager render in the tree layout flow, not at the requested coordinates

Context

Throne's HUD renders a panel with DrawQuad and needs text labels at exact positions inside that panel. Without absolute positioning, HUD text must bypass UiManager and use DrawText() directly, making IUIPort unusable for HUD overlays.

Suggested API

  1. SetNodePosition(ulong nodeId, float x, float y) — absolute screen position
  2. SetNodeVisible(ulong nodeId, bool visible) — show/hide individual nodes
  3. Optional: SetNodeSize(ulong nodeId, float width, float height) — explicit sizing

These would make UiManager viable for both tree-based menus and absolute-positioned HUD elements.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions