label

A label can be used to display text on the screen.

Styles:

  • style = Default style for this node.
@safe
alias label = simpleConstructor!Label

Examples

// Label takes just a single argument: the text to display
auto myLabel = label("Hello, World!");

// You can access and change label text
myLabel.text ~= " It's a nice day today!";

// Text will automatically wrap if it's too long to fit, but you can toggle it off
myLabel.isWrapDisabled = true;

Meta