public void SetActions(Dictionary <string, MNPopup.MNPopupAction> actions, MNPopup.MNPopupAction dismissAction)
    {
        if (isActive)
        {
            return;
        }

        int index = 0;

        this.dismiss = dismissAction;
        foreach (KeyValuePair <string, MNPopup.MNPopupAction> actionPair in actions)
        {
            UIButtons[index].Title.text = actionPair.Key;
            MNPopup.MNPopupAction a = actionPair.Value.Clone() as MNPopup.MNPopupAction;
            UIButtons[index].Button.onClick.AddListener(() => {
                a.Invoke();
                for (int i = 0; i < UIButtons.Length; i++)
                {
                    UIButtons[i].Button.onClick.RemoveAllListeners();
                }
                Hide();
            });
            UIButtons[index].gameObject.SetActive(true);

            index++;
        }
    }
	public void OnDismiss() {
		if (dismiss != null) {
			Hide ();
			dismiss.Invoke();
			dismiss = null;
		}
	}