Dialog
The dialog interface
Dialog.plain { text = "Hello, World!" }
Properties
result
Dialog.result: numberGet the result (choice) of the last dialog
Functions
wait
Dialog.wait() → number--
result of last dialog (choice)
Waits until all dialogs are closed
plain
Dialog.plain(options: table | nil--
settings
) → ()New plain text dialog
If table is nil, no dialog will be created.
Options
| Name | Type | Default | Description |
|---|---|---|---|
| text | string | ? | Dialog text contents / choices |
| instant | bool | false | Skip animations |
| pos | string | Center | Dialog position identifier |
Positions
| Name | Description |
|---|---|
| center | Center of screen |
| bottom | Bottom of screen |
| bottom_full | Full width bottom of screen |
| top | Top of screen |
| top_full | Full width top of screen |
| left | Left of screen |
| left_full | Full height left of screen |
| left_bottom | Bottom part left of screen |
| left_top | Top part left of screen |
| right | Right of screen |
| right_full | Full height right of screen |
| right_bottom | Bottom part right of screen |
| right_top | Top part right of screen |
chara
Dialog.chara(options: table | nil--
settings
) → ()New character dialog
If table is nil, no dialog will be created.
Options
| Name | Type | Default | Description |
|---|---|---|---|
| text | string | ? | Dialog text contents / choices |
| chara | string | - | Character identifier |
| name | string | - | Character name override |
| skin | string | - | Skin identifier override |
| pos | string | Center | Dialog position identifier |
If chara is "self", then skin is set to the current player skin.
Positions
| Name | Description |
|---|---|
| center | Center of screen |
| bottom | Bottom of screen |
| bottom_full | Full width bottom of screen |
| top | Top of screen |
| top_full | Full width top of screen |
| left | Left of screen |
| left_full | Full height left of screen |
| right | Right of screen |
| right_full | Full height right of screen |
inline
Dialog.inline(options: table | nil--
settings
) → ()New inline dialog
If table is nil, no dialog will be created.
Options
| Name | Type | Default | Description |
|---|---|---|---|
| text | string | ? | Dialog text contents / choices |
| x | number | 79 | Horizontall center (screen) |
| y | number | 44 | Vertical center (screen) |