Skip to content

UILabel(string, Vector2) Constructor

Definition

Namespace: Brine2D.UI

Creates a label at position with the given text.

C#
public UILabel(string text="", System.Numerics.Vector2 position=default(System.Numerics.Vector2));

Parameters

text System.String

position System.Numerics.Vector2

Remarks

Size is an approximation until the first Brine2D.UI.UILabel.Render\(Brine2D\.Rendering\.IRenderer\) call, so hit-testing before the first render may be slightly off. Both parameters default so new UILabel() works for anchor-driven/object-initializer use.