public void HandleUpdate() { if (Input.GetKeyDown(KeyCode.E) && !isTyping) { currentLine++; if (currentLine < Dialog.Lines.Count) { StartCoroutine(TypeDialog(Dialog.Lines[currentLine])); } else { currentLine = 0; dialogBox.SetActive(false); OnDialogClose?.Invoke(); } } }
public static void Show(string message, string caption = "", XNADialogButtons buttons = XNADialogButtons.Ok, EOMessageBoxStyle style = EOMessageBoxStyle.SmallDialogLargeHeader, OnDialogClose closingEvent = null) { EOMessageBox dlg = new EOMessageBox(message, caption, buttons, style); if (closingEvent != null) dlg.DialogClosing += closingEvent; }
public static void Show(DATCONST1 resource, string extraData, XNADialogButtons whichButtons = XNADialogButtons.Ok, EOMessageBoxStyle style = EOMessageBoxStyle.SmallDialogLargeHeader, OnDialogClose closingEvent = null) { if (!World.Initialized) throw new WorldLoadException("Unable to create dialog! World must be loaded and initialized."); EDFFile file = World.Instance.DataFiles[World.Instance.Localized1]; string message = file.Data[(int)resource + 1] + extraData; Show(message, file.Data[(int)resource], whichButtons, style, closingEvent); }
private void CloseDialog(object obj) { OnDialogClose?.Invoke(); }