public static void Show(DialogCloseDelegate callback, string message, string title, MessageBoxButtons buttons, Sprite icon, MessageBoxUI ui) { if (ui != null) { new MessageBox(callback, message, title, buttons, icon, ui); } else { Debug.LogError("Missing message box UI"); } }
protected MessageBox(DialogCloseDelegate callback, string message, string title, MessageBoxButtons buttons, Sprite icon, MessageBoxUI ui) { _closeDelegate += callback; Message = message; Title = title; Buttons = buttons; Icon = icon; UI = ui; UI.Owner = this; UI.gameObject.SetActive(true); ShowMessageOn(UI); }
/// <summary> /// Call to show the dialog. /// </summary> /// <param name="closeEvent">Delegate to invoke on closing the dialog.</param> /// <remarks> /// When <see cref="CanShowNative"/> is <c>true</c>, a call is made to <see cref="ShowNative()"/>. /// Otherwise the <see cref="DialogPanel"/> is made active then <see cref="OnShow()"/> is called. /// </remarks> public void ShowDialog(DialogCloseDelegate closeEvent) { Reset(); _closeDelegate += closeEvent; if (CanShowNative) { OnShowNative(); } else { DialogPanel.gameObject.SetActive(true); OnShow(); } }
public static void Hide(DialogState state, DialogCloseDelegate m = null) { if (Dialog.mTargetDialog == null) { if (m != null) { m(null, state); } return; } if (m != null) { Dialog.mTargetDialog.hideCallback += m; } Dialog.mTargetDialog.Hide(state); }
public static void Show(DialogCloseDelegate callback, string message, string title, MessageBoxButtons buttons, Sprite icon) { Show(callback, message, title, buttons, icon, MessageBoxUI.DefaultUI); }
public static void Show(DialogCloseDelegate callback, string message, string title, MessageBoxButtons buttons, MessageBoxUI ui) { Show(callback, message, title, buttons, null, ui); }
public static void Show(DialogCloseDelegate callback, string message, string title) { Show(callback, message, title, MessageBoxButtons.OK, null, MessageBoxUI.DefaultUI); }
public static void Show(DialogCloseDelegate callback, string message, MessageBoxUI ui) { Show(callback, message, "", MessageBoxButtons.OK, null, ui); }
public static void Hide(DialogCloseDelegate m) { Hide(DialogState.OK, m); }