A text field is a widget element for displaying text within a scrollable box. This is useful for descriptions and other instances of multi-line text that could vary in length. It can also be used as a text entry field, allowing the player to input text.
|Element ID||ID for the text field. This ID must be unique amongst other elements within the same widget. It is currently auto-generated but will be editable in a future update.|
|Text||Text that will be displayed in the text field.|
|Read-Only||Determines whether or not the field's text can be edited. When read-only is enabled, the player won't be able to type into the field.|
|Font||Font that will be used for the field's text. If the “Default” option is selected, your game's default dialogue font will be used.|
|Font Size||Font size to use for the field's text.|
You can access and change certain properties of a text field from within a script by simply referencing the parent widget and the element by their unique IDs. See below for examples of both changing the field's text and storing the field's text into a variable. In this case, the widget has an ID of “test” and the text field has an ID of “0001”.
Changing a field's text:
widget["test"].element["0001"].text = "New Text"
Storing a field's text into a variable:
$name = widget["test"].element["0001"].text; display_message("Hello, " + $name + "!")