/// <summary> /// Constructor with a list of dialog data, speed setting, and top/bottom positioning. Top/bottom /// positioning will override any auto-size/auto-center. /// </summary> /// <param name="dialogArg">List of dialog data</param> /// <param name="speedSetting">How fast to display the dialog</param> /// <param name="position">Top or bottom placement</param> public DialogBoxScreen(List<DialogData> dialogArg, DialogSpeed speedSetting, DialogPlacement position) { dialogList = dialogArg; dialogPlacement = position; dialogCounter = dialogList.Count; // Set the flags and variables usingMessageList = false; topBottomPosition = true; dialogCounter = -1; // Get the first message to display GetNextDialog(); IsPopup = true; // Set the delay timer to a default dialogSpeed = speedSetting; // If the speed is instant, skip ahead will be true if (dialogSpeed == DialogSpeed.Instant) textComplete = true; }
/// <summary> /// Constructor with title, a list of message, and speed setting on a timed setting. /// The dialog is also positioned and sized as specified. /// </summary> /// <param name="titleArg">Person who is talking in the dialog</param> /// <param name="messageArg">List of message of the dialog</param> /// <param name="speedSetting">How fast to display the dialog</param> /// <param name="size">How big to render the dialog box</param> public DialogBoxScreen(string titleArg, List<string> messageArg, DialogSpeed speedSetting, Vector2 position, Vector2 size) : this(titleArg, messageArg, speedSetting, position) { autoSizeDialog = false; dialogSize = size; }
/// <summary> /// Constructor with title, a list of message, and speed setting on a timed setting /// </summary> /// <param name="titleArg">Person who is talking in the dialog</param> /// <param name="messageArg">List of message of the dialog</param> /// <param name="speedSetting">How fast to display the dialog</param> /// <param name="duration">How long to display each dialog in milliseconds</param> public DialogBoxScreen(string titleArg, List<string> messageArg, DialogSpeed speedSetting, int duration) : this(titleArg, messageArg, speedSetting) { dialogTimed = true; dialogDuration = duration; }
/// <summary> /// Constructor with title, a list of message, and speed setting on a timed setting. /// The dialog is also positioned as specified. /// </summary> /// <param name="titleArg">Person who is talking in the dialog</param> /// <param name="messageArg">List of message of the dialog</param> /// <param name="speedSetting">How fast to display the dialog</param> /// <param name="position">Where to position the dialog box</param> public DialogBoxScreen(string titleArg, List<string> messageArg, DialogSpeed speedSetting, Vector2 position) : this(titleArg, messageArg, speedSetting) { centeredDialog = false; dialogPosition = position; }
/// <summary> /// Constructor with title, a list of message, and speed setting /// </summary> /// <param name="titleArg">Person who is talking in the dialog</param> /// <param name="messageArg">List of message of the dialog</param> /// <param name="speedSetting">How fast to display the dialog</param> public DialogBoxScreen(string titleArg, List<string> messageArg, DialogSpeed speedSetting) { title = titleArg; messageList = messageArg; usingMessageList = true; // Get the first message to display currentMsg = messageList[0]; IsPopup = true; // Set the delay timer to a default dialogSpeed = speedSetting; // If the speed is instant, skip ahead will be true if (dialogSpeed == DialogSpeed.Instant) textComplete = true; }