NarraLeaf

Text

Reading and writing the content, typography and effects of a wired nl.text element, and the value of a wired nl.textInput.

nl.text and nl.textInput are different widgets that share three node names between them. Both families sit here so that collision is visible in one place; the rules common to every Element node are in Element.

Text

Text nodes carry an element:nl.text pin, so the palette offers them only once the graph binds an nl.text element. Get Text reads the words on screen. Words that Set Text, Append Text, Clear Text and Set All Properties write show as written in every language, ahead of a Translation key and a Blueprint Value, until the page is opened again; the rules are those of the Self forms. The Self forms are in Text.

While the palette is browsed, the nine style getters from Get Font to Get Effects are one row, Get Text Style, and their setters are Set Text Style, with one row for each bound element. The ▾ beside a placed card's title switches it to another node of its family. See Node families.

Get Text

blueprint.element.text.getText · Pure

Reads the words on screen, in the player's current language.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textout · datastring

Set Text

blueprint.element.text.setText · Latent

Replaces the text content.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
textin · datastringAccepts an on-card literal.

Append Text

blueprint.element.text.appendText · Latent

Concatenates onto the end of the words on screen.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
textin · datastringAccepts an on-card literal.

Clear Text

blueprint.element.text.clearText · Latent

Sets the text to the empty string.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text

Get Font

blueprint.element.text.getFont · Pure

Reads the font asset id in use.

PinDirectionTypeNotes
elementin · dataelement:nl.text
fontAssetIdout · datastring

Set Font

blueprint.element.text.setFont · Latent

Sets the font asset id. An empty string clears the font back to the default.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
fontAssetIdin · datastringAccepts an on-card literal.

Get Font Size

blueprint.element.text.getFontSize · Pure

Reads the font size.

PinDirectionTypeNotes
elementin · dataelement:nl.text
fontSizeout · datafloat

Set Font Size

blueprint.element.text.setFontSize · Latent

Sets the font size. Values below 1 are raised to 1.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
fontSizein · datafloatAccepts an on-card literal.

Get Font Weight

blueprint.element.text.getFontWeight · Pure

Reads the font weight.

PinDirectionTypeNotes
elementin · dataelement:nl.text
fontWeightout · datastring

Set Font Weight

blueprint.element.text.setFontWeight · Latent

Sets the font weight: normal, 600 or bold. Anything else falls back to normal.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
fontWeightin · datastringAccepts an on-card literal.

Get Text Color

blueprint.element.text.getTextColor · Pure

Reads the text colour.

PinDirectionTypeNotes
elementin · dataelement:nl.text
colorout · dataRGBAColor

Set Text Color

blueprint.element.text.setTextColor · Latent

Sets the text colour.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
colorin · dataRGBAColor

Get Text Align

blueprint.element.text.getTextAlign · Pure

Reads the horizontal alignment.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textAlignout · datastring

Set Text Align

blueprint.element.text.setTextAlign · Latent

Sets the horizontal alignment: left, center or right.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
textAlignin · datastringAccepts an on-card literal.

Get Text Vertical Align

blueprint.element.text.getTextVerticalAlign · Pure

Reads the vertical alignment.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textVerticalAlignout · datastring

Set Text Vertical Align

blueprint.element.text.setTextVerticalAlign · Latent

Sets the vertical alignment: start, center or end.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
textVerticalAlignin · datastringAccepts an on-card literal.

Get Line Height

blueprint.element.text.getLineHeight · Pure

Reads the line height.

PinDirectionTypeNotes
elementin · dataelement:nl.text
lineHeightout · datafloat

Set Line Height

blueprint.element.text.setLineHeight · Latent

Sets the line height. Values below 0.1 are raised to 0.1.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
lineHeightin · datafloatAccepts an on-card literal.

Get Wrap Mode

blueprint.element.text.getWrapMode · Pure

Reads the wrap mode.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textWrapModeout · datastring

Set Wrap Mode

blueprint.element.text.setWrapMode · Latent

Sets the wrap mode: word, character or nowrap.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
textWrapModein · datastringAccepts an on-card literal.

Get Effects

blueprint.element.text.getEffects · Pure

Reads the static text effects as json.

PinDirectionTypeNotes
elementin · dataelement:nl.text
effectsout · datajson

Set Effects

blueprint.element.text.setEffects · Latent

Writes the static text effects.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
effectsin · datajson

Get All Properties

blueprint.element.text.getAllProperties · Pure

Ten outputs from one read, for when you want the whole text state without ten nodes.

PinDirectionTypeNotes
elementin · dataelement:nl.text
textout · datastring
fontAssetIdout · datastring
fontSizeout · datafloat
fontWeightout · datastring
colorout · dataRGBAColor
textAlignout · datastring
textVerticalAlignout · datastring
lineHeightout · datafloat
textWrapModeout · datastring
effectsout · datajson

Set All Properties

blueprint.element.text.setAllProperties · Latent

Writes all ten in one call. Every input falls back to the element's current value when it resolves to nothing, so driving only the two you care about is safe.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
elementin · dataelement:nl.text
textin · datastringAccepts an on-card literal.
fontAssetIdin · datastringAccepts an on-card literal.
fontSizein · datafloatAccepts an on-card literal.
fontWeightin · datastringAccepts an on-card literal.
colorin · dataRGBAColor
textAlignin · datastringAccepts an on-card literal.
textVerticalAlignin · datastringAccepts an on-card literal.
lineHeightin · datafloatAccepts an on-card literal.
textWrapModein · datastringAccepts an on-card literal.
effectsin · datajson

Text Input

These target nl.textInput, not nl.text, and their palette names collide head-on with the Text nodes above: two entries called Get Text, two called Set Text, two called Clear Text. The pin is what tells them apart — a Text Input node takes textInput typed element:nl.textInput, a Text node takes element typed element:nl.text — and in practice you only ever see one of each pair, because the palette offers whichever matches the binding your graph already holds. The Self forms are in Text Input.

Get Text

blueprint.element.textInput.getValue · Pure

Reads the field's current value and its length. length is declared float, not integer.

PinDirectionTypeNotes
textInputin · dataelement:nl.textInput
valueout · datastring
lengthout · datafloat

Set Text

blueprint.element.textInput.setValue · Latent

Replaces the field's value.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
textInputin · dataelement:nl.textInput
valuein · datastringAccepts an on-card literal.

Clear Text

blueprint.element.textInput.clear · Latent

Sets the field's value to the empty string.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
textInputin · dataelement:nl.textInput

On this page