Exemple #1
0
        public static void SetToolTipBasedOnToggle(this UiTooltip tooltip)
        {
            UiToggleButton componentInChildren = tooltip.gameObject.GetComponentInChildren <UiToggleButton>();

            if (componentInChildren != null && !string.IsNullOrEmpty(tooltip.alternateText))
            {
                string displayText = (!componentInChildren.toggledOn) ? tooltip.alternateText : tooltip.text;
                if (TooltipManager.field_Private_Static_Text_0 != null)             //Only return type field of text
                {
                    TooltipManager.Method_Public_Static_Void_String_0(displayText); //Last function to take string parameter
                }
                else if (tooltip != null)
                {
                    tooltip.text = displayText;
                }
            }
        }