예제 #1
0
        public void CreateAndShow()
        {
            UIModalBox box = UIModalBoxManager.Instance.Create(this.gameObject);

            box.SetText1(this.m_Text1);
            box.SetText2(this.m_Text2);
            box.SetConfirmButtonText(this.m_ConfirmText);
            box.SetCancelButtonText(this.m_CancelText);
            box.onConfirm.AddListener(OnConfirm);
            box.onCancel.AddListener(OnCancel);
            box.Show();
        }
예제 #2
0
        public void CreateAndShow()
        {
            if (UIModalBoxManager.Instance == null)
            {
                Debug.LogWarning("Could not load the modal box manager while creating a modal box.");
                return;
            }

            UIModalBox box = UIModalBoxManager.Instance.Create(this.gameObject);

            if (box != null)
            {
                box.SetText1(this.m_Text1);
                box.SetText2(this.m_Text2);
                box.SetConfirmButtonText(this.m_ConfirmText);
                box.SetCancelButtonText(this.m_CancelText);
                box.onConfirm.AddListener(OnConfirm);
                box.onCancel.AddListener(OnCancel);
                box.Show();
            }
        }