Documentation > Dialogs > DialogManager
Version: 3.1.6
Liste des entrées possibles dans un fichier de dialogue.
Chaque entrée doit obligatoirement être suivie du signe = sans aucun espace avant.\nLes entrées minimales pour un dialogue sont les suivantes (dans l'ordre) :\nDEFAULTFONT, START, NAME, TITLE*, TEXT*, STOP\nLes entrées signalées par une * peuvent être répétées.\n\nLa liste ci-dessous vous énumère toutes les entrées prises en compte dans la version courante.
DEFAULTFONT (obligatoire)
Police de caractère par défaut à utiliser pour tous les dialogues.
DEFAULTMUSIC
Musique par défaut à jouer pour tous les dialogues.
DEFAULTPOSITION
Position d'affichage à utiliser pour tous les dialogues.
START (obligatoire)
Indique le début d'un dialogue.
NAME (obligatoire)
Nom du dialogue pour pouvoir l'identifier lors de son appel.
DIALOGFONT
Police de caractère par défaut du dialogue courant.
DIALOGMUSIC
Musique par défaut du dialogue courant.
DIALOGPOSITION
Position par défaut du dialogue courant.
TITLE (obligatoire)
Titre de la conversation courante.
TEXT
Texte de la conversation courante.
IMAGE
Image de la conversation courante. Elle se place toujours au-dessus du texte.
FONT
Police de caractère de la conversation courante.
MUSIC
Musique de la conversation courante.
POSITION
Position de la conversation courante.
This module must be redone in its entirety.
Constructor DialogManager.New(ActionKey, Width, Height, Border)
This function creates a new DialogManager object.
ActionKey
Key used to speed up the current text or to go to the next dialog.
Width
Width in pixels that all components must not exceed.
Width
Height in pixels that all components must not exceed.
Border
Size in pixels for the border.
Return
Return an instance of DialogManager object.
DialogManager:addComponent(ComponentType, Args...)
This function add a new component defined by its given name and type. Can not be as the same type of the manager.
ComponentType
Type of the component to add.
Args...
Other arguments needed to create the component.
Return
Returns a new instance of the component.
DialogManager:addDialogs(File, Name)
This function allow to add a new dialog or a group of dialogs. If a name is filled, the new dialog or group of dialog is added using the name key.
File
Path and name of a dialog file. Must be with a Lua extension.
Name
Name used to store the dialog or group of dialog.
MenuManager:callbackZOrder()
This functions is used to ensure that all components are drawn in the right order.
DialogManager:draw()
This function draw the dialog at the right place with the dev's options and applyed the width and border.
DialogManager:getDialog()
This function returns the current dialog.
Return
Returns the current dialog.
DialogManager:getName()
This function returns the name of the dialog manager.
Return
returns the name of the dialog manager.
DialogManager:isActionKeyPressed()
This function checks if the action key is pressed.
Return
True if the action key/button is pressed; false otherwise.
DialogManager:isDialogFinished()
This function returns if the dialog is finished or not.
Return
True if the dialog is finished; false otherwise.
DialogManager:continueDialog()
DialogManager:play(Name)
This function launch the dialog.
Name
Name to retreive the dialog.
DialogManager:resetComponents()
This function remove all components.
DialogManager:restartComponents()
This function resets all components needed to display the dialog.
DialogManager:retreiveDisplayText()
This function retreive the text from the thread.
DialogManager:setActionKey(Key)
This function indicates which key will be used to increase the speed of the text and go to the next dialog text.
Key
Code of the key used to increase the speed of the text and go to the next dialog text.
DialogManager:setComponents(Dialog)
This function creates all components needed to the dialog and start the thread.
DialogManager:setDialogPosition(Dialog)
This function update the position and alignment of all dialog components using the datas from the given dialog.
Dialog
Table containing all datas of the current dialog.
DialogManager:update(dt)
This function update the dialog text and increase the speed for displaying the text if the ActionKey is pressed.
dt
Delta-time
DialogManager:ToString(NoTitle)
This function display all variables containing in the current DialogManager instance (tables and functions are excluded).
NoTitle
Indicates if the title must be displayed (false) or not (true).
Me contacter