Unsets the everything related to a initialized dialog.
Replaces custom tokens in text with their actual values. Use ${HERO} to replace by hero name. Use ${BREAK} to start a new window. Use ${BREAK_LINE} to break line. Use ${PAUSE:duration_ms} to delay the dialog for the given duration value in ms. Use ${STORAGE:storage_key} to replace by by a storage value with the given key. Place your text between ${COLOR:hex_value} and ${COLOR:/} to change its color.
The text to be formatted.
Returns the text formetted.
Tries to calculate the position of the avatar window
the window position object.
Returns the avatar position.
Tries to calculate the position of the dialog window.
the window width.
the window height.
Returns the window position.
If you started a dialog with next_dialog, calls this function to kill it.
on dialog kill callback.
if true, destroys only the dialog window and keeps the avatar window.
if true, destroys the dialog crystal.
Mounts and shows the dialog.
On window mount callback
Custom dialog window position object.
Custom avatar window position object.
Calls the next dialog window. If the dialog is finished, this function passes true to the callback.
Every time a dialog section is shown, this function is called. If it's the last section, passes true to it.
Custom dialog window position object.
Custom avatar window position.
This is an optional way to invoke a dialog instead of set_dialog. It calls a window and let it open till you call next_dialog again or call kill_dialog. It's expected that the given text fits in one window.
The text to be shown.
The on window ready callback.
The dialog options.
The avatar key name.
Custom avatar window position object.
Custom dialog window position object.
The current hero direction in order to better calculate window position.
Whether the dialog crystall will be shown or not.
The voice key sfx in order to be played while the text is shown.
Receives a text string and mounts the the dialog sections that will go to each window of the dialog.
the dialog text.
the dialog options.
The avatar key name.
Whether the avatar is going to be inside the dialog window or not.
A custom max dialog width.
The current hero direction in order to better calculate window position.
The voice key sfx in order to be played while the text is shown.
Creates and configs the dialog crystal sprite.
Sets current hero direction.
the hero direction.
Updates the borders in the case of a Mind Read window.
Updates the dialog and avatar windows.
Generated using TypeDoc
A dialog can be divided in N windows depending on the dialog text size. To set a dialog, call the DialogManager.set_dialog function and pass the entire dialog text. To advance the dialog (call next window), call the DialogManager.next function. Optionallly, if you know that the given text fits in one window, you can use DialogManager.next_dialog.