예제 #1
0
        public override void Repaint()
        {
            if (ObservedItem != null)
            {
                Notification container = Container as Notification;

                if (this.m_Text != null)
                {
                    this.m_Text.text = WidgetUtility.ColorString(ObservedItem.text, ObservedItem.color);
                    DelayCrossFade(this.m_Text, ObservedItem);
                }

                if (this.m_Time != null)
                {
                    this.m_Time.text = (string.IsNullOrEmpty(container.timeFormat) ? "" : "[" + DateTime.Now.ToString(container.timeFormat) + "] ");
                    DelayCrossFade(this.m_Time, ObservedItem);
                }

                if (this.m_Icon != null)
                {
                    this.m_Icon.gameObject.SetActive(ObservedItem.icon != null);
                    if (ObservedItem.icon != null)
                    {
                        this.m_Icon.overrideSprite = ObservedItem.icon;
                        DelayCrossFade(this.m_Icon, ObservedItem);
                    }
                }
            }
        }
예제 #2
0
        private IEnumerator DelayTooltip(float delay)
        {
            float time = 0.0f;

            yield return(true);

            while (time < delay)
            {
                time += Time.deltaTime;
                yield return(true);
            }


            instance.Show(WidgetUtility.ColorString(tooltipTitle, color), WidgetUtility.ColorString(tooltip, color), icon, m_PropertyPairs, width, showBackground);
        }
예제 #3
0
 public virtual void Show(NotificationOptions settings, UnityAction <int> result, params string[] buttons)
 {
     Show(settings.title, WidgetUtility.ColorString(settings.text, settings.color), settings.icon, result, buttons);
 }