Example #1
0
        private static void TranslateTooltip(UIComponent tooltipParent, CultureInfo cultureInfo)
        {
            DateTooltipBehavior tooltipBehavior = tooltipParent.gameObject.GetComponent <DateTooltipBehavior>();

            if (tooltipBehavior != null)
            {
                tooltipBehavior.Translate(cultureInfo);
            }
        }
Example #2
0
        private static void SetTooltip(UIComponent component, CultureInfo cultureInfo, bool customize)
        {
            DateTooltipBehavior tooltipBehavior = component.gameObject.GetComponent <DateTooltipBehavior>();

            if (tooltipBehavior == null && customize)
            {
                tooltipBehavior = component.gameObject.AddComponent <DateTooltipBehavior>();
                tooltipBehavior.IgnoredComponentNamePrefix = UISpriteEvent;
                tooltipBehavior.Translate(cultureInfo);
            }
            else if (tooltipBehavior != null && !customize)
            {
                UnityEngine.Object.Destroy(tooltipBehavior);
            }
        }