示例#1
0
        private void RefreshSiblingsState()
        {
            IEnumerator enumerator = base.transform.parent.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    object    obj       = enumerator.Current;
                    Transform transform = (Transform)obj;
                    ToggleUIPopupListSelection component = transform.GetComponent <ToggleUIPopupListSelection>();
                    if (component)
                    {
                        component.RefreshState();
                    }
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
        }
        private IEnumerator RepositionPopupIcon()
        {
            yield return(null);

            while (TweenTransform.ActiveTransformTweener > 0)
            {
                yield return(null);
            }
            if (this._sliderActionIcon.activeSelf != this._showPopupIcon)
            {
                this._sliderActionIcon.SetActive(this._showPopupIcon);
            }
            ToggleUIPopupListSelection proxy = this._currentTarget.GetComponent <ToggleUIPopupListSelection>();
            Vector3    position = this._sliderActionIcon.transform.localPosition;
            GameObject widget;

            if (proxy)
            {
                widget = proxy._target.gameObject;
            }
            else
            {
                widget = this._currentTarget.gameObject;
            }
            GamepadInputToSelectedPopup gamepadPopupInput = base.GetComponent <GamepadInputToSelectedPopup>() ?? base.gameObject.AddComponent <GamepadInputToSelectedPopup>();

            gamepadPopupInput.CurrentTarget  = widget;
            gamepadPopupInput.ForwardButton  = widget.transform.parent.Find("Fwd").gameObject;
            gamepadPopupInput.BackwardButton = widget.transform.parent.Find("Bwd").gameObject;
            if (this._showPopupIcon)
            {
                GamepadInputIconPosition componentInParent = this._currentTarget.GetComponentInParent <GamepadInputIconPosition>();
                if (componentInParent)
                {
                    position.x = this._sliderActionIcon.transform.parent.InverseTransformPoint(componentInParent._positionTarget.position).x;
                }
                else
                {
                    position.x = this._sliderActionIcon.transform.parent.InverseTransformPoint(widget.transform.position).x + 325f;
                }
                this._sliderActionIcon.transform.localPosition = position;
            }
            yield break;
        }