Offer a Submit button as another route
A visible Submit button is useful when you also want a tap/click route. Create a GDScript record called submit_command, then call it from that button's Click event.
extends "res://scripts/runtime/script_base.gd"func run(_context: Dictionary = {}) -> Variant:
var command: String = str(GetGUIElementProperty(
"workshop_hud", "hud_parser", "text", ""
)).strip_edges()
if command.is_empty():
return false
SetGUIElementProperty(
"workshop_hud", "hud_parser", "value", ""
)
await Runtime.run_text_parser_command(command)
return trueThis native GDScript helper reads the field before clearing it and passes that saved sentence to the runtime parser. It does not need a new parser rule for the Submit button itself.
Figure 29. The status response in the fresh preview uses the starting visitor and score.
Figure 30. The HUD has both the Enter field and a separate Submit button. The field is empty again after submission.
The button helper does not add an extra focus-restoration routine after it rebuilds the field. The player can click the field again. Use the built-in Enter route when its return-focus behavior is the one you want for repeated typing.
