Beispiel #1
0
        public void RefreshGuildListPanel(bool isHideListExtraContent = false)
        {
            if (!this.IsShow())
            {
                return;
            }
            GameObject widget = this.m_form.GetWidget(5);

            widget.CustomSetActive(true);
            switch (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_baseGuildInfo.guildState)
            {
            case 0:
            case 1:
            case 2:
            case 7:
            {
                int           guildInfoCount = this.m_Model.GetGuildInfoCount();
                CUIListScript component      = this.m_form.GetWidget(30).GetComponent <CUIListScript>();
                component.SetElementAmount(guildInfoCount);
                GameObject widget2 = this.m_form.GetWidget(36);
                GameObject widget3 = this.m_form.GetWidget(37);
                GameObject widget4 = this.m_form.GetWidget(31);
                if (guildInfoCount > 0)
                {
                    component.SelectElement(0, true);
                    widget2.CustomSetActive(true);
                    widget3.CustomSetActive(true);
                    widget4.CustomSetActive(true);
                }
                else
                {
                    widget2.CustomSetActive(false);
                    widget3.CustomSetActive(false);
                    widget4.CustomSetActive(false);
                }
                if (isHideListExtraContent)
                {
                    component.HideExtraContent();
                }
                break;
            }
            }
        }
Beispiel #2
0
        private void RefreshPrepareGuildPanelPrepareGuildList(byte pageId, bool isHideListExtraContent)
        {
            GameObject widget  = this.m_form.GetWidget(12);
            GameObject widget2 = this.m_form.GetWidget(13);
            GameObject widget3 = this.m_form.GetWidget(23);
            GameObject widget4 = this.m_form.GetWidget(25);
            GameObject widget5 = this.m_form.GetWidget(26);
            GameObject widget6 = this.m_form.GetWidget(24);

            widget.CustomSetActive(true);
            widget2.CustomSetActive(false);
            widget6.CustomSetActive(false);
            CUIListScript component             = this.m_form.GetWidget(27).GetComponent <CUIListScript>();
            int           prepareGuildInfoCount = this.m_Model.GetPrepareGuildInfoCount();

            component.SetElementAmount(prepareGuildInfoCount);
            if (prepareGuildInfoCount > 0)
            {
                component.SelectElement(0, true);
                widget3.CustomSetActive(true);
                widget4.CustomSetActive(true);
                widget5.CustomSetActive(true);
            }
            else
            {
                widget3.CustomSetActive(false);
                widget4.CustomSetActive(false);
                widget5.CustomSetActive(false);
            }
            if (isHideListExtraContent)
            {
                component.HideExtraContent();
            }
            Text component2 = this.m_form.GetWidget(38).GetComponent <Text>();

            component2.text = pageId.ToString();
        }