Understanding dialogs
Dialog properties
All dialogs end up being composed by some properties (it does not matter the origin of those dialogs, they all end up being the same).
Property | Type | Description |
text | string | It stores the text that is being displayed. |
speaker | string | It stores the speaker. |
images | Image[] | It stores the images that will be displayed along the dialog. |
locked | bool | It stores wether the dialog will be locked (it means the dialog cannot be skipped using managed dialog controls). |
events | string[] | It stores event codes that get called when the dialog is displayed. |
Each dialog provider has its own strategy that generates dialogs following this format. For example, the SimpleDialogProvider
simply maps provided dialogs (as they have almost the same format). In the other hand, the I18nDialogProvider
cannot map directly provided dialogs because they don't have the text property. I18n dialogs have a key property that refers to a translation entry. When this provider generates the dialogs it needs to create the text property, so it gets the translation using the key and creates the text property from the translation result.