Portal 2: Community Edition

Documentation

Home ReferenceVScriptAngelscriptPanorama
GitHub
Edit

Control: Label

The Label control is a simple text display.

Example

<!-- Simple text -->
<Label text="Sample Text"/>

<!-- Localized strings -->
<Label text="#PORTAL2_NewGame"/>

Properties

Name Type Description
text string The text to display
html bool Whether or not the text should be parsed as html

Methods

SetLocalizationString

Assign a localization string to the label

myLabel.SetLocalizationString('PORTAL2_NewGame');

SetProceduralTextThatIPromiseIsLocalizedAndEscaped

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');