예제 #1
0
        public void SetIcon(GlobalUIIcon icon)
        {
            IconImage.enabled = (icon != GlobalUIIcon.None);
            switch (icon)
            {
            case GlobalUIIcon.None:
                IconImage.overrideSprite = null;
                break;

            case GlobalUIIcon.Error:
                IconImage.overrideSprite = ErrorSprite;
                break;

            case GlobalUIIcon.NoNetwrok:
                IconImage.overrideSprite = NoNetwrokSprite;
                break;

            default:
                IconImage.overrideSprite = null;
                break;
            }
        }
예제 #2
0
 public void Show(string msg, Action ok = null, Action cancel = null, string okText = "", string cancelText = "", GlobalUIIcon icon = GlobalUIIcon.None)
 {
     panel.Init(msg);
     if (ok != null && !ClickOKEvents.Contains(ok))
     {
         ClickOKEvents.Add(ok);
     }
     if (cancel != null && !ClickCancelEvents.Contains(cancel))
     {
         ClickCancelEvents.Add(cancel);
     }
     panel.SetIcon(icon);
     panel.IsConfirmStyle(cancel != null);
     panel.okText.text     = string.IsNullOrEmpty(okText) ? Localization.Get(R.Lang.OK) : okText;
     panel.cancelText.text = string.IsNullOrEmpty(cancelText) ? Localization.Get(R.Lang.Cancel) : cancelText;
     panel.Show();
     mask.Show();
 }