Source code for simvx.core.nodes_2d.text

"""Text2D -- Screen-space text overlay."""

from ..descriptors import Property
from ..properties import Colour
from .node2d import Node2D


[docs] class Text2D(Node2D): """Screen-space text overlay for HUD/UI. Works in both 2D and 3D modes. Text rendering is handled by the scene adapter (MSDF text pass) when using the Vulkan backend. The draw() method is intentionally a no-op to avoid duplicate rendering via the bitmap Draw2D path. """ text = Property("", hint="Text to display") font_scale = Property(1.0, range=(0.1, 100.0), hint="Font size") font_colour = Colour((1.0, 1.0, 1.0, 1.0)) x = Property(0.0, hint="Screen X position (pixels)") y = Property(0.0, hint="Screen Y position (pixels)")