Skip to reading
Buttons, Labels & Text Boxes

Keep editable text literal

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

A text box is not a live output label. Its starting Text and Placeholder are not passed through the label/button wildcard expansion. This prevents the editor from continually replacing words the player is trying to edit.

Source table from Keep editable text literal, page 25
Put this text hereResult
Label Text: @PlayerNameThe active character's display name.
Button Text: Add a point ($$score)A caption containing the live score.
Text Box starting Text: @PlayerName / $$scoreThose literal characters remain editable.
Text Box Placeholder: Hello @PlayerNameLiteral guidance while empty; not the expanded character name.

Figure 19. The literal-input example keeps @PlayerName and $$score in the text box. The neighbouring password/cipher controls have different display rules.

Fill a field deliberately when you want a value there#

To prefill a text box with the saved visitor name, read visitor_name in a script and write that String to the text box's value property. Do this when the form opens or when the player chooses Restore, rather than refreshing it every frame.

Constantly rebuilding or refilling a focused input can move its caret, remove focus or replace an unfinished answer. Use a separate label for live output, and let the input remain under the player's control until submission.

The visitor-name and note recipes below show the explicit read/write connection. The same idea works for an answer form, a notebook title or a rename dialog.

Page 25 of 46Permalink
Go to page