Class YauiText
A text element, generated by the Advanced Text Generator (shaping, OS font fallback, line breaking rules and rich text) and drawn as SDF glyphs by the uber shader. Its size is measured by the layout unless set. Child elements are ignored.
Assembly: Yaui.dll
View Source
public class YauiText : YauiElement
Inheritance: System.Object -> Yaui.YauiElement
Properties
Text
View Source
public string Text { get; set; }
Font
View Source
public Font Font { get; set; }
FontSize
View Source
public float FontSize { get; set; }
Color
The default color. Rich text tags can override it.
View Source
public Color Color { get; set; }
Align
View Source
public TextAlign Align { get; set; }
VerticalAlign
View Source
public VerticalAlign VerticalAlign { get; set; }
WordWrap
View Source
public bool WordWrap { get; set; }
SpriteAsset
View Source
public SpriteAsset SpriteAsset { get; set; }
RichText
View Source
public bool RichText { get; set; }
Overflow
View Source
public TextOverflow Overflow { get; set; }
OutlineWidth
View Source
public float OutlineWidth { get; set; }
OutlineColor
View Source
public Color OutlineColor { get; set; }
ShadowColor
View Source
public Color ShadowColor { get; set; }
ShadowOffset
View Source
public Vector2 ShadowOffset { get; set; }
ShadowBlur
View Source
public float ShadowBlur { get; set; }
AcceptsChildren
Whether child elements are laid out and drawn. Elements that measure their content (Yaui.YauiElement.MeasuresContent) never have children.
View Source
protected override bool AcceptsChildren { get; }
HasVisibleContent
Whether the element draws content besides its box: it is then hittable. Call Yaui.YauiElement.SyncHittable() when the value changes.
View Source
protected override bool HasVisibleContent { get; }
Methods
OnValidate()
View Source
protected override void OnValidate()
OnDidApplyAnimationProperties()
View Source
protected override void OnDidApplyAnimationProperties()
OnRegistered()
Called after the element got its slots in a panel (when enabled, or moved to another panel): write the content here. Content written before is gone.
View Source
protected override void OnRegistered()
OnUnregistering()
Called before the element releases its slots, including its content. The stores may already be shut down (domain reload).
View Source
protected override void OnUnregistering()
OnLayoutApplied()
Main thread, once a frame right before rendering: the layout of this element changed (Yaui.YauiElement.LayoutRect, Yaui.YauiElement.ContentBox). Content written here is drawn in this frame.
View Source
protected override void OnLayoutApplied()