ui_text
Write text into a player-editable UI field and read it back to verify the change. Refuses to modify non-editable labels.
Instructions
Write into an edit box, and read it back.
Only a field the player could type into may be written. A plain
TextWidget has SetText too, but writing a mod's label from outside would
change what the player sees without changing anything the mod believes -- a
lie drawn on the screen -- so it is refused rather than quietly allowed.
The value is read back out of the widget before the answer is returned:
SetText is native and returns nothing, so "it was set" would otherwise be
this tool's own claim about itself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| root | No | menu | |
| text | Yes | ||
| timeout | No | ||
| expect_name | No | ||
| expect_class | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| hint | No | ||
| error | No |