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); } } } }
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); }
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); }