ESCDialog
Extends: ESCStatement < Reference
Description
An ESC dialog
Constants Descriptions
END_REGEX
const END_REGEX: String = "^(?<indent>\\s*)!.*$"
A Regex that matches the end of a dialog
REGEX
const REGEX: String = "^(\\s*)\\?( (?<avatar>[^ ]+))?( (?<timeout>[^ ]+))?( (?<timeout_option>.+))?$"
Regex that matches dialog lines
Property Descriptions
avatar
var avatar: String = "-"
Avatar used in the dialog
timeout
var timeout: int = 0
Timeout until the timeout_option option is selected. Use 0 for no timeout
timeout_option
var timeout_option: int = 0
The dialog option to select when timeout is reached
options
var options: Array
A list of ESCDialogOptions
Method Descriptions
load_string
func load_string(dialog_string: String)
Construct a dialog from an ESC dialog string
Parameters
dialog_string: ESC dialog string
is_valid
func is_valid() -> bool
Check if dialog is valid
run
func run()
Run this dialog