Skip to content

UILabel Class

Definition

Namespace: Brine2D.UI

Simple text label UI component.

C#
public class UILabel : Brine2D.UI.IUIComponent, Brine2D.UI.IAnchoredUIComponent

Inheritance System.Object → UILabel

Implements IUIComponent, IAnchoredUIComponent

Constructors
UILabel\(string, Vector2\) Creates a label at position with the given text.
Properties
Anchor The screen anchor point this component is positioned relative to.
AnchorOffset Pixel offset from the resolved anchor point.
Color Text color.
Font Font to use for rendering. When null, the renderer's default font is used.
MaxWidth Maximum pixel width before text wraps. 0 = no wrapping.
Text Text to display.
Events
OnClick Fired when the label is clicked.