public void CreateDialog() { DialogBuilder builder = m_builderFactory.Create(); builder.SetTitle(Title) .SetMessage(Message) .SetIcon(Icon); for (int i = 0; i < Buttons.Length; ++i) { builder.AddButton(Buttons [i].ButtonText, DummyCallback); } builder.Build(); }
public static void Confirm(String message, Action onConfirm = null, Action onCancel = null) { if (onConfirm == null) { onConfirm = delegate { ViewController.SwitchView(ViewIndex.WORLDMAP_WORLD_MAP); }; } ViewController.SwitchView(delegate { DialogBuilder builder = new DialogBuilder(); builder.SetTitle("###<color=yellow>超級機</color>###"); builder.AddSubView(MenuIcon.Create(MenuIcon.IconType.LUCKYDRAW_DISNEY, null).gameObject); builder.SetMessage(message); builder.AddButton(Locale.t("LABEL_OK"), onConfirm); if (onCancel != null) builder.AddButton(Locale.t("LABEL_CANCEL"), onCancel); builder.Show(); }); }