Пример #1
0
 public void Show(OkButtonCallback OnConfirm,
                  CancelButtonCallback OnCancel,
                  ConfirmationPopupData confirmationPopupData)
 {
     OkBtn.onClick.AddListener(() => { OnConfirm(); });
     CancelBtn.onClick.AddListener(() => { OnCancel(); });
     SetInfo(confirmationPopupData);
     UIController.ShowPopup <ConfirmationPopup>();
 }
Пример #2
0
        private void SetInfo(ConfirmationPopupData confirmationPopupData)
        {
            switch (confirmationPopupData.confirmationType)
            {
            case ConfirmationType.Error:
                titleTxt.color = errorColor;
                break;

            case ConfirmationType.Warning:
                titleTxt.color = warningColor;
                break;

            case ConfirmationType.Info:
                titleTxt.color = infoColor;
                break;
            }
            titleTxt.text   = confirmationPopupData.title;
            messageTxt.text = confirmationPopupData.message;
        }