//Popup Sample public void PopUpButtonClicked() { Action a, a2; a = delegate { PopupManager.Instance.HidePopup(); }; a2 = delegate { Action a3 = delegate { PopupManager.Instance.HidePopup(); }; ButtonData b1 = new ButtonData("showPrev", true, a3); List <ButtonData> bList1 = new List <ButtonData> (); bList1.Add(b1); PopupData p1 = new PopupData("one button!!!", true, bList1); PopupManager.Instance.ShowPopup(PopupType.OneButton, p1, Vector3.zero, false); }; ButtonData b = new ButtonData("showNext", true, a2); ButtonData b2 = new ButtonData("close", true, a); List <ButtonData> bList = new List <ButtonData> (); bList.Add(b); bList.Add(b2); PopupData p = new PopupData("two button!!!", true, bList); PopupManager.Instance.ShowPopup(PopupType.TwoButton, p, Vector3.zero, true); }
//===================================================================================================== // Text and 'button texts and callbacks' to show on popup! // Do NOT call directly! Use PopupManager to show popups! public void Show(PopupType type, PopupData data) { Hide(); pType = type; p = data; Populate(); gameObject.SetActive(true); }