예제 #1
0
        private IEnumerator RepositionSliderIcon()
        {
            yield return(null);

            while (TweenTransform.ActiveTransformTweener > 0)
            {
                yield return(null);
            }
            if (this._sliderActionIcon.activeSelf != this._showSliderIcon)
            {
                this._sliderActionIcon.SetActive(this._showSliderIcon);
            }
            if (this._showSliderIcon)
            {
                Vector3 localPosition = this._sliderActionIcon.transform.localPosition;
                GamepadInputIconPosition componentInParent = this._currentTarget.GetComponentInParent <GamepadInputIconPosition>();
                if (componentInParent)
                {
                    localPosition.x = this._sliderActionIcon.transform.parent.InverseTransformPoint(componentInParent._positionTarget.position).x;
                }
                else
                {
                    localPosition.x = this._currentTarget.GetComponentInChildren <UISprite>().CalculateBounds(this._sliderActionIcon.transform.parent).max.x + 175f;
                }
                this._sliderActionIcon.transform.localPosition = localPosition;
            }
            yield break;
        }
예제 #2
0
        private IEnumerator RepositionButtonIcon()
        {
            yield return(null);

            while (TweenTransform.ActiveTransformTweener > 0)
            {
                yield return(null);
            }
            yield return(null);

            yield return(null);

            Vector3 position = this._buttonActionIcon.transform.localPosition;

            if (this._currentTarget == null)
            {
                yield break;
            }
            if (this._currentTarget.GetComponentInChildren <LoadSaveSlotInfo>())
            {
                position.x = 210f;
                position.y = -140f;
            }
            else
            {
                GamepadInputIconPosition componentInParent = this._currentTarget.GetComponentInParent <GamepadInputIconPosition>();
                if (componentInParent)
                {
                    if (!componentInParent._showIcon)
                    {
                        if (this._buttonActionIcon.activeSelf)
                        {
                            this._buttonActionIcon.SetActive(false);
                        }
                        yield break;
                    }
                    position.x = this._sliderActionIcon.transform.parent.InverseTransformPoint(componentInParent._positionTarget.position).x;
                }
                else
                {
                    position.x = (this._currentTarget.GetComponentInChildren <UILabel>() ?? this._currentTarget.GetComponentInChildren <UIWidget>()).CalculateBounds(this._buttonActionIcon.transform.parent).max.x + 60f;
                }
                position.y = 22f;
            }
            if (!this._buttonActionIcon.activeSelf)
            {
                this._buttonActionIcon.SetActive(true);
            }
            this._buttonActionIcon.transform.localPosition = position;
            yield break;
        }
예제 #3
0
        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;
        }