public void Show(OkButtonCallback OnConfirm, CancelButtonCallback OnCancel, ConfirmationPopupData confirmationPopupData) { OkBtn.onClick.AddListener(() => { OnConfirm(); }); CancelBtn.onClick.AddListener(() => { OnCancel(); }); SetInfo(confirmationPopupData); UIController.ShowPopup <ConfirmationPopup>(); }
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; }