A themed, non-interactive text label. tone picks the theme text ramp (PRIMARY/SECONDARY/
TERTIARY) so theme swaps restyle it; colorOverride pins an explicit ARGB color instead. Set
key (+ fallback) for localized text, or assign text directly.
Constructor
Variables
wrapWidth:Float = 0
When > 0, the label word-wraps to this width (multi-line); 0 keeps the single-line auto-size.
Methods
localize(key:String, fallback:String):Void
Switches the label to a localized string.
Parameters:
key | the translation key |
|---|---|
fallback | the source-language text |
measure():Float
Forces an immediate (re)layout so w/h are valid right now instead of on the next frame.
Use before positioning sibling widgets below a wrapped label in a flow layout, where the
deferred render would otherwise report a stale (often zero) height.
Returns:
the measured height