Пример #1
0
    private void RefreshUI(int idx)
    {
        if (this.m_form == null)
        {
            return;
        }
        GameObject pickObject = this.m_PickObject;

        if (pickObject != null)
        {
            CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>();
            if (component)
            {
                for (int i = 0; i < this.m_PickIdxList.Length; i++)
                {
                    if (i == idx)
                    {
                        GameObject element = component.GetElement(this.m_PickIdxList[i]);
                        if (element)
                        {
                            Transform transform = element.transform.FindChild("Image_Pointer");
                            if (transform != null)
                            {
                                transform.gameObject.CustomSetActive(true);
                            }
                        }
                    }
                    else
                    {
                        GameObject element2 = component.GetElement(this.m_PickIdxList[i]);
                        if (element2)
                        {
                            Transform transform2 = element2.transform.FindChild("Image_Pointer");
                            if (transform2 != null)
                            {
                                transform2.gameObject.CustomSetActive(false);
                            }
                        }
                    }
                }
            }
        }
        bool bActive = idx == this.m_totalImgNum - 1 || this.m_totalImgNum == 0;

        this.m_BottomBtn.CustomSetActive(bActive);
        if (this.m_bShowChooseGuideNextTime)
        {
            this.m_form.GetWidget(7).CustomSetActive(bActive);
        }
        else
        {
            this.m_form.GetWidget(7).CustomSetActive(false);
        }
        this.m_PickObject.CustomSetActive(idx != this.m_totalImgNum - 1);
        this.m_BtnLeft.CustomSetActive(idx != 0 && this.m_totalImgNum > 1);
        this.m_BtnRight.CustomSetActive(idx != this.m_totalImgNum - 1 && this.m_totalImgNum > 1);
    }
Пример #2
0
 private void RefreshUI(int idx)
 {
     if (this.m_form != null)
     {
         GameObject pickObject = this.m_PickObject;
         if (pickObject != null)
         {
             CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>();
             if (component != null)
             {
                 for (int i = 0; i < this.m_PickIdxList.Length; i++)
                 {
                     if (i == idx)
                     {
                         GameObject element = component.GetElement(this.m_PickIdxList[i]);
                         if (element != null)
                         {
                             Transform transform = element.transform.FindChild("Image_Pointer");
                             if (transform != null)
                             {
                                 transform.gameObject.CustomSetActive(true);
                             }
                         }
                     }
                     else
                     {
                         GameObject obj4 = component.GetElement(this.m_PickIdxList[i]);
                         if (obj4 != null)
                         {
                             Transform transform2 = obj4.transform.FindChild("Image_Pointer");
                             if (transform2 != null)
                             {
                                 transform2.gameObject.CustomSetActive(false);
                             }
                         }
                     }
                 }
             }
         }
         this.m_BottomBtn.CustomSetActive((idx == (this.m_totalImgNum - 1)) || (this.m_totalImgNum == 0));
         this.m_PickObject.CustomSetActive(idx != (this.m_totalImgNum - 1));
         this.m_BtnLeft.CustomSetActive((idx != 0) && (this.m_totalImgNum > 1));
         this.m_BtnRight.CustomSetActive((idx != (this.m_totalImgNum - 1)) && (this.m_totalImgNum > 1));
     }
 }
Пример #3
0
        private void EnablePickObj(int idx)
        {
            GameObject pickObject = this.m_PickObject;

            if (pickObject != null)
            {
                CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>();
                if (component)
                {
                    for (int i = 0; i < this.m_PickIdxList.Length; i++)
                    {
                        if (i == idx)
                        {
                            GameObject element = component.GetElement(this.m_PickIdxList[i]);
                            if (element)
                            {
                                Transform transform = element.transform.FindChild("Image_Pointer");
                                if (transform != null)
                                {
                                    transform.gameObject.CustomSetActive(true);
                                }
                            }
                        }
                        else
                        {
                            GameObject element2 = component.GetElement(this.m_PickIdxList[i]);
                            if (element2)
                            {
                                Transform transform2 = element2.transform.FindChild("Image_Pointer");
                                if (transform2 != null)
                                {
                                    transform2.gameObject.CustomSetActive(false);
                                }
                            }
                        }
                    }
                }
            }
        }
    private void InitPickObjElement(int nImageCount)
    {
        GameObject pickObject = this.m_PickObject;

        if (pickObject != null)
        {
            CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>();
            if (component != null)
            {
                component.RecycleAllElement();
                for (int i = 0; i < nImageCount; i++)
                {
                    this.m_PickIdxList[i] = component.GetElement();
                }
            }
        }
    }
Пример #5
0
        public override void Validate()
        {
            this._urlaList = UrlAction.ParseFromText(base.view.activity.Content, null);
            int count = this._urlaList.Count;

            if (count > 0)
            {
                this._stepList.SetElementAmount(count);
                for (int i = 0; i < count; i++)
                {
                    UrlAction            urlAction = this._urlaList[i];
                    CUIListElementScript elemenet  = this._stepList.GetElemenet(i);
                    if (null != elemenet)
                    {
                        CUIHttpImageScript component = elemenet.GetComponent <CUIHttpImageScript>();
                        if (null != component)
                        {
                            component.SetImageUrl(urlAction.target);
                        }
                    }
                }
                this._pickIdxList = new int[count];
                if (this._pickObject != null)
                {
                    CUIContainerScript component2 = this._pickObject.GetComponent <CUIContainerScript>();
                    if (component2 != null)
                    {
                        component2.RecycleAllElement();
                        for (int j = 0; j < this._urlaList.Count; j++)
                        {
                            this._pickIdxList[j] = component2.GetElement();
                        }
                    }
                }
                this._curStepIndex = 0;
                this._leftToRight  = true;
                this._stepList.MoveElementInScrollArea(this._curStepIndex, true);
                this.EnablePickObj(this._curStepIndex);
                this._lastScrollTime = Time.time;
                this.updateOverTime();
            }
        }