Skip to content

Label : VisualElement

This is the label class. It provides a simple text display element that automatically resizes its width based on the text content.

Properties

PropertyTypeDefaultDescription
textstringLabelThe text content to display. Can be a string or a function that returns a string
autoSizebooleantrueWhether the label should automatically resize its width based on the text content

Functions

MethodReturnsDescription
Label:getWrappedTexttableGets the wrapped lines of the Label

Protected Functions

MethodReturnsDescription
Label:initLabelInitializes the Label instance
Label:render-Renders the Label by drawing its text content

Label:getWrappedText()

Gets the wrapped lines of the Label

Returns

  • table wrappedText The wrapped lines of the Label

Released under the MIT License.