| layout | default |
|---|---|
| title | Label |
| parent | Controls |
| grand_parent | Panorama |
The Label control is a simple text display.
<!-- Simple text -->
<Label text="Sample Text"/>
<!-- Localized strings -->
<Label text="#PORTAL2_NewGame"/>| Name | Type | Description |
|---|---|---|
| text | string | The text to display |
| html | bool | Whether or not the text should be parsed as html |
Assign a localization string to the label
myLabel.SetLocalizationString("PORTAL2_NewGame");Yes that's an actual function name. Assigns raw text to a label. Use with caution.
myLabel.SetProceduralTextThatIPromiseIsLocalizedAndEscaped(
"Some text that should not be processed"
);