Co-authored-by: Dennis Ploeger <develop@dieploegers.de> Co-authored-by: dploeger <dploeger@users.noreply.github.com>
95 lines
1.3 KiB
Markdown
95 lines
1.3 KiB
Markdown
<!-- Auto-generated from JSON by GDScript docs maker. Do not edit this document directly. -->
|
|
|
|
# ESCDialog
|
|
|
|
**Extends:** [ESCStatement](../ESCStatement) < [Object](../Object)
|
|
|
|
## Description
|
|
|
|
An ESC dialog
|
|
|
|
## Constants Descriptions
|
|
|
|
### END\_REGEX
|
|
|
|
```gdscript
|
|
const END_REGEX: String = "^(?<indent>\\s*)!.*$"
|
|
```
|
|
|
|
A Regex that matches the end of a dialog
|
|
|
|
### REGEX
|
|
|
|
```gdscript
|
|
const REGEX: String = "^(\\s*)\\?( (?<type>[^ ]+))?( (?<avatar>[^ ]+))?( (?<timeout>[^ ]+))?( (?<timeout_option>.+))?$"
|
|
```
|
|
|
|
Regex that matches dialog lines
|
|
|
|
## Property Descriptions
|
|
|
|
### type
|
|
|
|
```gdscript
|
|
var type: String = ""
|
|
```
|
|
|
|
Dialog type
|
|
|
|
### avatar
|
|
|
|
```gdscript
|
|
var avatar: String = ""
|
|
```
|
|
|
|
Avatar used in the dialog
|
|
|
|
### timeout
|
|
|
|
```gdscript
|
|
var timeout: int = 0
|
|
```
|
|
|
|
Timeout until the timeout_option option is selected. Use 0 for no timeout
|
|
|
|
### timeout\_option
|
|
|
|
```gdscript
|
|
var timeout_option: int = 0
|
|
```
|
|
|
|
The dialog option to select when timeout is reached
|
|
|
|
### options
|
|
|
|
```gdscript
|
|
var options: Array
|
|
```
|
|
|
|
A list of ESCDialogOptions
|
|
|
|
## Method Descriptions
|
|
|
|
### \_init
|
|
|
|
```gdscript
|
|
func _init(dialog_string: String)
|
|
```
|
|
|
|
Construct a dialog from a dialog string
|
|
|
|
### is\_valid
|
|
|
|
```gdscript
|
|
func is_valid() -> bool
|
|
```
|
|
|
|
Dialogs have no conditions, just return true
|
|
|
|
### run
|
|
|
|
```gdscript
|
|
func run()
|
|
```
|
|
|
|
Run this dialog |