Private _stepPrivate avatarPrivate avatar_Private avatar_Private dataPrivate dialog_Private dialog_Private dialog_Private dialog_Private finishedPrivate font_Private gamePrivate hero_Private italic_Private mind_Private partsPrivate pos_Private show_Private voice_Private windowStatic Private Readonly COLOR_Static Private Readonly COLOR_Static Private Readonly COLOR_Static Private Readonly COLOR_Static Private Readonly COLOR_Static Private Readonly DIALOG_Static Private Readonly PAUSE_Static Private Readonly PAUSE_Static Private Readonly VOICE_Private format_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.
Private get_Private get_If you started a dialog with next_dialog, calls this function to kill it.
Optional callback: (() => void)on dialog kill callback.
if true, destroys only the dialog window and keeps the avatar window.
if true, destroys the dialog crystal.
Private mount_Mounts and shows the dialog.
On window mount callback
Custom dialog window position object.
Optional x?: numberOptional y?: numberCustom avatar window position object.
Optional x?: numberOptional y?: numberCalls 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.
Optional custom_pos: { Custom dialog window position object.
Optional x?: numberOptional y?: numberOptional custom_avatar_pos: { Custom avatar window position.
Optional x?: numberOptional y?: numberThis 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.
Optional options: { The dialog options.
Optional avatar?: stringThe avatar key name.
Optional custom_Custom avatar window position object.
Optional x?: numberOptional y?: numberOptional custom_Custom dialog window position object.
Optional x?: numberOptional y?: numberOptional hero_The current hero direction in order to better calculate window position.
Optional show_Whether the dialog crystall will be shown or not.
Optional voice_The voice key sfx in order to be played while the text is shown.
Quick way to invoke a dialog box built on top of DialogManager.next_dialog. This also contains controls handler for Button.A.
the dialog text or a list of them.
Optional options: { The dialog options.
Optional avatar?: stringThe avatar key name.
Optional custom_Custom avatar window position object.
Optional x?: numberOptional y?: numberOptional custom_Custom dialog window position object.
Optional x?: numberOptional y?: numberOptional hero_The current hero direction in order to better calculate window position.
Optional show_Whether the dialog crystall will be shown or not.
Optional voice_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.
Optional options: { the dialog options.
Optional avatar?: stringThe avatar key name.
Optional avatar_Whether the avatar is going to be inside the dialog window or not.
Optional custom_A custom max dialog width.
Optional hero_The current hero direction in order to better calculate window position.
Optional voice_The voice key sfx in order to be played while the text is shown.
Private set_Private set_Sets current hero direction.
the hero direction.
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. Optionallly, if you want a very quick way to set a dialog, you can use DialogManager.quick_dialog.