Skip to main content

DialogController

The DialogController is the class responsible for managing dialogs display. It stores the current display state and displays dialogs as desired (calling respective events when necessary).

Methods API

MethodParametersReturnsDescription
IsActiveboolWether there is an active dialog (a dialog being displayed) or not.
SetDialogstring: dialog codeSets the current dialog by dialog code.
SetDialogint: dialog indexSets the current dialog by dialog index.
GetEntrystring: dialog codeDialogEntryRetrieves a loaded dialog entry by dialog code.
GetEntryint: dialog indexDialogEntryRetrieves a loaded dialog entry by dialog index.
GetEntryIndexstring: dialog codeintGets the dialog index of a dialog by its code.
StartDialogint: initial dialog index (default = 0)Begins displaying dialogs.
MoveDialog
  • int (steps): dialogs amount (default = 1)
  • bool (bypassLock): wether to move even when dialog is locked or not (default = false)
Moves the currentDialog state a certain amount of dialogs count.
NextDialogbool: wether to move even when dialog is locked or not (default = false)Moves to the next dialog.
PrevDialogbool: wether to move even when dialog is locked or not (default = false)Moves to the previous dialog.

Events

EventParametersDescription
onSpeakerstring: speaker valueCalled every time the current dialog changes along with the speaker value. Called even when speaker did not change.
onImageARegisterDialogEntry.Image[]: imagesCalled every time the current dialog changes along with dialog images. Called even when images do not change.
onDialogChangeCalled every time the current dialog changes.
onDialogsEndCalled when the last dialog is skipped.