// Token: 0x06002CD9 RID: 11481 RVA: 0x000C3830 File Offset: 0x000C1A30
    public void Show()
    {
        AreaMapUI instance = AreaMapUI.Instance;

        if (this.Icon == WorldMapIconType.Invisible)
        {
            return;
        }
        if (!this.IsVisible(instance))
        {
            return;
        }
        if (this.m_iconGameObject)
        {
            this.m_iconGameObject.SetActive(true);
        }
        else
        {
            GameObject icon = instance.IconManager.GetIcon(this.Icon);
            this.m_iconGameObject = (GameObject)InstantiateUtility.Instantiate(icon);
            Transform transform = this.m_iconGameObject.transform;
            transform.parent        = instance.Navigation.MapPivot.transform;
            transform.localPosition = this.Position;
            transform.localRotation = Quaternion.identity;
            transform.localScale    = icon.transform.localScale;
            TransparencyAnimator.Register(transform);
        }
    }
    // Token: 0x0600267A RID: 9850 RVA: 0x000ABB78 File Offset: 0x000A9D78
    private void ManuallyRegister(Transform child)
    {
        if (!base.IsInitialized)
        {
            return;
        }
        TransparencyAnimator component = child.GetComponent <TransparencyAnimator>();

        if (component)
        {
            this.m_childTransparencyAnimators.Add(component);
            return;
        }
        CleverMenuItem component2 = child.GetComponent <CleverMenuItem>();

        if (component2 != null && component2.AnimateColors)
        {
            if (this.m_cleverMenuItems == null)
            {
                this.m_cleverMenuItems = new List <CleverMenuItem>();
            }
            this.m_cleverMenuItems.Add(component2);
            return;
        }
        this.AddChild(child);
        this.AddChildren(child);
        this.ApplyTransparency(true);
    }
    // Token: 0x06002678 RID: 9848 RVA: 0x000ABA80 File Offset: 0x000A9C80
    private void AddChildren(Transform childTransform)
    {
        int childCount = childTransform.childCount;

        for (int i = 0; i < childCount; i++)
        {
            Transform            child     = childTransform.GetChild(i);
            TransparencyAnimator component = child.GetComponent <TransparencyAnimator>();
            if (component != null)
            {
                this.m_childTransparencyAnimators.Add(component);
            }
            else
            {
                CleverMenuItem component2 = child.GetComponent <CleverMenuItem>();
                if (component2 != null && component2.AnimateColors)
                {
                    if (this.m_cleverMenuItems == null)
                    {
                        this.m_cleverMenuItems = new List <CleverMenuItem>();
                    }
                    this.m_cleverMenuItems.Add(component2);
                }
                this.AddChild(child);
                this.AddChildren(child);
            }
        }
    }
    // Token: 0x06002679 RID: 9849 RVA: 0x000ABB24 File Offset: 0x000A9D24
    public static void Register(Transform child)
    {
        Transform parent = child.parent;

        while (parent)
        {
            TransparencyAnimator component = parent.GetComponent <TransparencyAnimator>();
            if (component && component.AnimateChildren)
            {
                component.ManuallyRegister(child);
                break;
            }
            parent = parent.parent;
        }
    }
Beispiel #5
0
    // Token: 0x06003887 RID: 14471 RVA: 0x000E6ECC File Offset: 0x000E50CC
    private CleverMenuItem AddItem(string label)
    {
        GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(SettingsScreen.Instance.transform.Find("highlightFade/pivot/damageText").gameObject);

        gameObject.transform.SetParent(this.pivot);
        CleverMenuItem component = gameObject.GetComponent <CleverMenuItem>();

        this.selectionManager.MenuItems.Add(component);
        this.layout.AddItem(component);
        this.layout.Sort();
        component.OnUnhighlight();
        TransparencyAnimator[] componentsInChildren = component.transform.GetComponentsInChildren <TransparencyAnimator>();
        for (int i = 0; i < componentsInChildren.Length; i++)
        {
            componentsInChildren[i].Reset();
            componentsInChildren[i].enabled = true;
        }
        foreach (object obj in gameObject.transform.FindChild("glowGroup"))
        {
            TransparencyAnimator.Register((Transform)obj);
        }
        gameObject.transform.Find("text/nameText").GetComponent <MessageBox>().SetMessage(new MessageDescriptor(label));
        return(component);
    }