private void RefreshWinCntRankList()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CUnionBattleRankSystem.UNION_RANK_PATH);

            if (form == null)
            {
                return;
            }
            GameObject             widget   = form.GetWidget(0);
            CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)this.m_CurSelRankType].listInfo;
            Transform transform             = widget.transform.FindChild("RankingList");
            Transform transform2            = widget.transform.FindChild("NoRankTxt");

            if (listInfo == null || listInfo.dwItemNum == 0u)
            {
                transform.gameObject.CustomSetActive(false);
                transform2.gameObject.CustomSetActive(true);
                return;
            }
            transform.gameObject.CustomSetActive(true);
            transform2.gameObject.CustomSetActive(false);
            int           dwItemNum = (int)listInfo.dwItemNum;
            CUIListScript component = transform.GetComponent <CUIListScript>();

            component.SetElementAmount(dwItemNum);
            component.MoveElementInScrollArea(0, true);
            for (int i = 0; i < dwItemNum; i++)
            {
                if (component.GetElemenet(i) != null && component.IsElementInScrollArea(i))
                {
                    this.RefreshOneWinCntElement(component.GetElemenet(i).gameObject, i);
                }
            }
        }
Example #2
0
 public static void UpdateGodFindBtns(CUIListScript uiList, int index)
 {
     if (uiList != null)
     {
         int elementAmount = uiList.GetElementAmount();
         for (int i = 0; i < elementAmount; i++)
         {
             if (((uiList.GetElemenet(i) != null) && (uiList.GetElemenet(i).gameObject != null)) && uiList.IsElementInScrollArea(i))
             {
                 Utility.FindChild(uiList.GetElemenet(i).gameObject, "FindBtn/Select").CustomSetActive(index == i);
             }
         }
     }
 }
Example #3
0
        private void On_Guild_PrepareGuild_Create_Icon_Selected(CUIEvent uiEvent)
        {
            CUIListScript srcWidgetScript = uiEvent.m_srcWidgetScript as CUIListScript;

            if (srcWidgetScript != null)
            {
                int selectedIndex = srcWidgetScript.GetSelectedIndex();
                if (selectedIndex == -1)
                {
                    selectedIndex = 0;
                }
                CUIListElementScript elemenet = srcWidgetScript.GetElemenet(selectedIndex);
                if (elemenet != null)
                {
                    Text component = elemenet.transform.Find("imgIcon/txtIconIdData").GetComponent <Text>();
                    this.m_form.GetWidget(8).GetComponent <Text>().text = component.text;
                    this.m_form.GetWidget(4).GetComponent <Image>().SetSprite(elemenet.transform.Find("imgIcon").GetComponent <Image>());
                    CUIFormScript srcFormScript = uiEvent.m_srcFormScript;
                    if (srcFormScript != null)
                    {
                        srcFormScript.Close();
                    }
                }
            }
        }
Example #4
0
        private void InitTab(CUIListScript list)
        {
            if (list == null)
            {
                return;
            }
            bool flag = Singleton <CGuildSystem> .GetInstance().IsInNormalGuild();

            int num = Enum.GetValues(typeof(COBSystem.enOBTab)).get_Length() - 1;

            if (!flag)
            {
                num--;
            }
            list.SetElementAmount(num);
            string[] array = new string[]
            {
                "OB_Expert",
                "OB_Freind",
                "OB_Guild",
                "OB_Local"
            };
            for (int i = 0; i < num; i++)
            {
                CUIListElementScript elemenet = list.GetElemenet(i);
                int num2 = (i + 1 < 3 || flag) ? i : (i + 1);
                elemenet.m_onEnableEventParams.tag = num2;
                Utility.GetComponetInChild <Text>(elemenet.gameObject, "Text").text = Singleton <CTextManager> .get_instance().GetText(array[num2]);
            }
            list.SelectElement(0, true);
        }
Example #5
0
        private void RefreshHeroListElement(uint heroId)
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CHeroOverviewSystem.s_heroViewFormPath);

            if (form == null)
            {
                return;
            }
            GameObject    gameObject  = form.gameObject;
            GameObject    gameObject2 = gameObject.transform.Find("Panel_Hero/List").gameObject;
            CUIListScript component   = gameObject2.GetComponent <CUIListScript>();

            for (int i = 0; i < this.m_heroList.get_Count(); i++)
            {
                if (this.m_heroList.get_Item(i).cfgID == heroId)
                {
                    CUIListElementScript elemenet = component.GetElemenet(i);
                    if (elemenet != null)
                    {
                        GameObject gameObject3 = elemenet.gameObject.transform.Find("heroItem").gameObject;
                        CHeroOverviewSystem.SetPveHeroItemData(form, gameObject3, this.m_heroList.get_Item(i));
                    }
                    break;
                }
            }
        }
Example #6
0
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
        }
        else
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CSymbolSystem.s_symbolFormPath);

            if (form != null)
            {
                Transform transform = form.transform.FindChild("TopCommon/Panel_Menu/ListMenu");
                if (transform != null)
                {
                    CUIListScript component = transform.gameObject.GetComponent <CUIListScript>();
                    if (component != null)
                    {
                        CUIListElementScript elemenet = component.GetElemenet(1);
                        if (elemenet != null)
                        {
                            GameObject gameObject = elemenet.transform.gameObject;
                            if (gameObject.activeInHierarchy)
                            {
                                base.AddHighLightGameObject(gameObject, true, form, true, new GameObject[0]);
                                base.Initialize();
                            }
                        }
                    }
                }
            }
        }
    }
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
        }
        else
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CTaskSys.TASK_FORM_PATH);

            CUIListScript component = form.transform.FindChild("TopCommon/Panel_Menu/List").GetComponent <CUIListScript>();
            GameObject    baseGo    = null;
            int           index     = base.currentConf.Param[0];
            if (component != null)
            {
                component.MoveElementInScrollArea(index, true);
                baseGo = component.GetElemenet(index).gameObject;
            }
            if (baseGo != null)
            {
                base.AddHighLightGameObject(baseGo, true, form, true);
                base.Initialize();
            }
        }
    }
Example #8
0
        public void InitList(int TabIndex, CUIListScript list)
        {
            ResMiShuInfo[] resList = this.GetResList(TabIndex);
            list.SetElementAmount(resList.Length);
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            for (int i = 0; i < resList.Length; i++)
            {
                Transform transform = list.GetElemenet(i).transform;
                Image     component = transform.Find("imgIcon").GetComponent <Image>();
                Text      text      = transform.Find("lblTitle").GetComponent <Text>();
                Text      text2     = transform.Find("lblUnLock").GetComponent <Text>();
                Text      text3     = transform.Find("lblDesc").GetComponent <Text>();
                Text      text4     = transform.Find("lblCoinDesc").GetComponent <Text>();
                Button    btn       = transform.Find("btnGoto").GetComponent <Button>();
                component.SetSprite(CUIUtility.s_Sprite_Dynamic_Task_Dir + resList[i].dwIconID, list.m_belongedFormScript, true, false, false);
                text.text  = resList[i].szName;
                text2.text = resList[i].szUnOpenDesc;
                text3.text = resList[i].szDesc;
                text4.text = string.Empty;
                if ((resList[i].bShowCoinLimit > 0) && (masterRoleInfo != null))
                {
                    uint getCnt   = 0;
                    uint limitCnt = 0;
                    masterRoleInfo.GetCoinDailyInfo((RES_COIN_GET_PATH_TYPE)resList[i].bCoinGetPath, out getCnt, out limitCnt);
                    text4.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("Coin_GetCnt_Daily_Desc"), getCnt, limitCnt);
                }
                this.InitSysBtn(btn, (RES_GAME_ENTRANCE_TYPE)resList[i].bGotoID, text2.gameObject, text4.gameObject);
            }
        }
        private void InitMenu()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CQualifyingSystem.s_qualifyingFormPath);

            if (form == null)
            {
                return;
            }
            GameObject    gameObject = form.gameObject.transform.Find("Panel/ListMenu").gameObject;
            CUIListScript component  = gameObject.GetComponent <CUIListScript>();

            string[] array = new string[]
            {
                Singleton <CTextManager> .GetInstance().GetText("Qualifying_Menu1"),
                Singleton <CTextManager> .GetInstance().GetText("Qualifying_Menu2")
            };
            component.SetElementAmount(array.Length);
            for (int i = 0; i < component.m_elementAmount; i++)
            {
                CUIListElementScript elemenet = component.GetElemenet(i);
                Text component2 = elemenet.gameObject.transform.Find("Text").GetComponent <Text>();
                component2.text = array[i];
            }
            this.m_menuIndex = 0;
        }
Example #10
0
        public void Draw()
        {
            CUIListScript component = this.m_cuiForm.GetWidget(0).GetComponent <CUIListScript>();

            int[] numArray = new int[] { 100, 200, 300, 400, 500, 600 };
            component.SetElementAmount(numArray.Length);
            for (byte i = 0; i < numArray.Length; i = (byte)(i + 1))
            {
                CUIListElementScript elemenet = component.GetElemenet(i);
                CUIEventScript       script3  = elemenet.gameObject.GetComponent <CUIEventScript>();
                if (script3 == null)
                {
                    script3 = elemenet.gameObject.AddComponent <CUIEventScript>();
                    script3.Initialize(elemenet.m_belongedFormScript);
                }
                stUIEventParams eventParams = new stUIEventParams();
                int             num2        = numArray[i] / 10;
                eventParams.tag = numArray[i];
                script3.SetUIEvent(enUIEventType.Click, enUIEventID.Purchase_BuyDiamond, eventParams);
                Text text  = elemenet.gameObject.transform.Find("pnlPrice/txtQuantity").GetComponent <Text>();
                Text text2 = elemenet.gameObject.transform.Find("pnlPrice/txtPrice").GetComponent <Text>();
                text.text  = numArray[i].ToString();
                text2.text = num2.ToString();
            }
        }
Example #11
0
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
        }
        else
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CSymbolSystem.s_symbolFormPath);

            if (form != null)
            {
                Transform transform = form.transform.Find("Panel_SymbolEquip/Panel_SymbolBag/Panel_BagList/List");
                if (transform != null)
                {
                    CUIListScript component = transform.GetComponent <CUIListScript>();
                    if (component != null)
                    {
                        int index = base.currentConf.Param[1];
                        if (base.currentConf.Param[0] > 0)
                        {
                            index = Singleton <CSymbolSystem> .GetInstance().GetSymbolListIndex(NewbieGuideCheckTriggerConditionUtil.AvailableSymbolId);
                        }
                        CUIListElementScript elemenet = component.GetElemenet(index);
                        GameObject           baseGo   = (elemenet == null) ? null : elemenet.gameObject;
                        if ((baseGo != null) && baseGo.activeInHierarchy)
                        {
                            base.AddHighLightGameObject(baseGo, true, form, true, new GameObject[0]);
                            base.Initialize();
                        }
                    }
                }
            }
        }
    }
Example #12
0
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
            return;
        }
        CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(Singleton <CMallSystem> .get_instance().sMallFormPath);

        if (form == null)
        {
            return;
        }
        CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "TopCommon/Panel_Menu/ListMenu");

        if (componetInChild == null)
        {
            return;
        }
        int tabIndex = Singleton <CMallSystem> .get_instance().GetTabIndex((CMallSystem.Tab)base.currentConf.Param[0]);

        GameObject gameObject = componetInChild.GetElemenet(tabIndex).gameObject;

        base.AddHighLightGameObject(gameObject, true, form, true);
        base.Initialize();
    }
Example #13
0
        private void On_Guild_PrepareGuild_Create_Icon_Selected(CUIEvent uiEvent)
        {
            CUIListScript cUIListScript = uiEvent.m_srcWidgetScript as CUIListScript;

            if (cUIListScript == null)
            {
                return;
            }
            int num = cUIListScript.GetSelectedIndex();

            if (num == -1)
            {
                num = 0;
            }
            CUIListElementScript elemenet = cUIListScript.GetElemenet(num);

            if (elemenet == null)
            {
                return;
            }
            Text component  = elemenet.transform.Find("imgIcon/txtIconIdData").GetComponent <Text>();
            Text component2 = this.m_form.GetWidget(8).GetComponent <Text>();

            component2.text = component.text;
            Image component3 = this.m_form.GetWidget(4).GetComponent <Image>();

            component3.SetSprite(elemenet.transform.Find("imgIcon").GetComponent <Image>());
            CUIFormScript srcFormScript = uiEvent.m_srcFormScript;

            if (srcFormScript != null)
            {
                srcFormScript.Close();
            }
        }
Example #14
0
        private void InitTab(CUIListScript list)
        {
            if (list != null)
            {
                int amount = Enum.GetValues(typeof(enOBTab)).Length - 1;
                list.SetElementAmount(amount);
                string text = string.Empty;
                for (int i = 0; i < amount; i++)
                {
                    switch (((enOBTab)(i + 1)))
                    {
                    case enOBTab.Expert:
                        text = Singleton <CTextManager> .instance.GetText("OB_Expert");

                        break;

                    case enOBTab.Friend:
                        text = Singleton <CTextManager> .instance.GetText("OB_Freind");

                        break;

                    case enOBTab.Local:
                        text = Singleton <CTextManager> .instance.GetText("OB_Local");

                        break;
                    }
                    Utility.GetComponetInChild <Text>(list.GetElemenet(i).gameObject, "Text").text = text;
                }
                list.SelectElement(0, true);
            }
        }
Example #15
0
        private void OnUpdateSubModule(CUIEvent uiEvent)
        {
            CUIFormScript srcFormScript = uiEvent.m_srcFormScript;

            if (srcFormScript == null)
            {
                return;
            }
            CUIListScript component = srcFormScript.GetWidget(0).GetComponent <CUIListScript>();

            srcFormScript.GetWidget(8).CustomSetActive(false);
            switch (this.m_selectMenuType)
            {
            case enSymbolMenuType.SymbolEquip:
                srcFormScript.GetWidget(5).CustomSetActive(true);
                this.m_symbolWearCtrl.SwitchToSymbolWearPanel(srcFormScript);
                break;

            case enSymbolMenuType.SymbolRecommend:
                srcFormScript.GetWidget(3).CustomSetActive(true);
                this.m_symbolRcmdCtrl.SwitchToSymbolRcmdPanel(srcFormScript);
                Singleton <CUINewFlagSystem> .GetInstance().DelNewFlag(component.GetElemenet(1).gameObject, enNewFlagKey.New_BtnSymbolFlagKey_V1, true);

                Singleton <CBattleGuideManager> .GetInstance().OpenBannerDlgByBannerGuideId(7u, null, false);

                break;

            case enSymbolMenuType.SymbolMake:
                srcFormScript.GetWidget(4).CustomSetActive(true);
                Singleton <CSymbolMakeController> .GetInstance().SwitchToSymbolMakePanel(srcFormScript);

                break;
            }
        }
Example #16
0
        private void OpenSymbolForm()
        {
            MonoSingleton <NewbieGuideManager> .GetInstance().SetNewbieBit(14, true, false);

            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSymbolSystem.s_symbolFormPath, false, true);

            if (cUIFormScript != null)
            {
                string text = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Symbol");

                string text2 = Singleton <CTextManager> .GetInstance().GetText("SymbolRcmd_Tab");

                string text3 = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Make");

                string[] titleList = new string[]
                {
                    text,
                    text2,
                    text3
                };
                GameObject widget = cUIFormScript.GetWidget(0);
                CUICommonSystem.InitMenuPanel(widget, titleList, (int)this.m_selectMenuType, true);
                CUIListScript component = widget.GetComponent <CUIListScript>();
                Singleton <CUINewFlagSystem> .GetInstance().AddNewFlag(component.GetElemenet(1).gameObject, enNewFlagKey.New_BtnSymbolFlagKey_V1, enNewFlagPos.enTopRight, 1f, 0f, 0f, enNewFlagType.enNewFlag);
            }
        }
Example #17
0
        private static void SetTeamHeroList(GameObject list, List <uint> heroIds, out int teamPower)
        {
            CUIListScript        component = list.GetComponent <CUIListScript>();
            CUIListElementScript elemenet  = null;

            teamPower = 0;
            component.SetElementAmount(heroIds.Count);
            for (int i = 0; i < heroIds.Count; i++)
            {
                elemenet = component.GetElemenet(i);
                GameObject gameObject = elemenet.gameObject.transform.Find("heroItemCell").gameObject;
                if (heroIds[i] > 0)
                {
                    IHeroData data = CHeroDataFactory.CreateHeroData(heroIds[i]);
                    teamPower += data.combatEft;
                    CUICommonSystem.SetHeroItemData(elemenet.m_belongedFormScript, gameObject, data, enHeroHeadType.enIcon, false, enHeroInfoShowType.enPVE);
                    elemenet.gameObject.CustomSetActive(true);
                    gameObject.gameObject.CustomSetActive(true);
                }
                else
                {
                    elemenet.gameObject.CustomSetActive(false);
                    gameObject.gameObject.CustomSetActive(false);
                }
            }
        }
 private void SetTeamFightDisplay(CUIListScript list, List <HeroKDA> kdaContaienr, int[] result, int totalResult, bool isBlue)
 {
     list.SetElementAmount(kdaContaienr.get_Count());
     int[] array = CBattleStatCompetitionSystem.BubbleSort(result);
     for (int i = 0; i < list.GetElementAmount(); i++)
     {
         int num = array[i];
         CUIListElementScript elemenet = list.GetElemenet(i);
         this.SetHead(elemenet, kdaContaienr.get_Item(num));
         elemenet.transform.FindChild("Num").GetComponent <Text>().set_text(result[num].ToString());
         GameObject gameObject  = elemenet.transform.FindChild("Bar/BarFill").gameObject;
         GameObject gameObject2 = elemenet.transform.FindChild("Bar/BarFillRed").gameObject;
         gameObject.CustomSetActive(isBlue);
         gameObject2.CustomSetActive(!isBlue);
         Image component = gameObject.GetComponent <Image>();
         if (!isBlue)
         {
             component = gameObject2.GetComponent <Image>();
         }
         float num2 = 0f;
         if (totalResult != 0)
         {
             num2 = (float)result[num] / (float)totalResult;
         }
         component.set_fillAmount(num2);
         elemenet.transform.FindChild("Bar/FillText").GetComponent <Text>().set_text((int)(num2 * 100f) + "%");
     }
 }
Example #19
0
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
            return;
        }
        CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CHeroSelectNormalSystem.s_heroSelectFormPath);

        if (form != null)
        {
            int  index = (int)base.currentConf.Param[0];
            bool flag  = base.currentConf.Param[1] > 0;
            bool flag2 = base.currentConf.Param[2] > 0;
            if (flag2)
            {
                uint heroID = (uint)base.currentConf.Param[0];
                index = Singleton <CHeroSelectBaseSystem> .get_instance().GetCanUseHeroIndex(heroID);
            }
            string name = "PanelLeft/ListHostHeroInfo";
            if (flag)
            {
                name = "PanelLeft/ListHostHeroInfoFull";
            }
            Transform transform = form.transform.FindChild(name);
            if (transform != null)
            {
                CUIListScript component = transform.gameObject.GetComponent <CUIListScript>();
                if (component != null)
                {
                    CUIListElementScript elemenet = component.GetElemenet(index);
                    if (elemenet != null)
                    {
                        Transform transform2 = elemenet.transform.Find("heroItemCell");
                        if (transform2 != null)
                        {
                            GameObject gameObject = transform2.gameObject;
                            if (gameObject.activeInHierarchy)
                            {
                                CUIEventScript component2 = gameObject.GetComponent <CUIEventScript>();
                                if (component2 != null && !component2.enabled)
                                {
                                    this.CompleteHandler();
                                }
                                else
                                {
                                    base.AddHighLightGameObject(gameObject, true, form, true);
                                    base.Initialize();
                                }
                            }
                        }
                    }
                    else
                    {
                        this.CompleteHandler();
                    }
                }
            }
        }
    }
Example #20
0
        private void OnShowMainPanel(enHeadImgTab curTab)
        {
            CUIFormScript form = Singleton <CUIManager> .instance.GetForm(s_headImgChgForm);

            if (form != null)
            {
                int                  count           = this.GetCurHeadImgList(curTab).Count;
                CUIListScript        componetInChild = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "pnlBg/Panel_Main/List");
                CUIListElementScript elemenet        = null;
                componetInChild.SetElementAmount(count);
                for (int i = 0; i < count; i++)
                {
                    elemenet = componetInChild.GetElemenet(i);
                    if ((elemenet != null) && (elemenet.gameObject != null))
                    {
                        this.OnUpdateElement(elemenet.gameObject, i, curTab);
                    }
                }
                if (count > 0)
                {
                    componetInChild.SelectElement(0, true);
                }
                else
                {
                    this.OnShowDetailPanel(-1);
                }
            }
        }
Example #21
0
        private void RefreshAwardPanel(CUIFormScript shareForm, uint achievementId)
        {
            ResAchievement dataByKey = GameDataMgr.achieveDatabin.GetDataByKey(achievementId);

            if (dataByKey != null)
            {
                ListView <CUseable> view = new ListView <CUseable>();
                CUseable            item = CUseableManager.CreateVirtualUseable(enVirtualItemType.enAchievementPoint, (int)dataByKey.dwPoint);
                view.Add(item);
                for (int i = 0; i < dataByKey.astReward.Length; i++)
                {
                    if ((dataByKey.astReward[i].bRewardType != 0) && (dataByKey.astReward[i].dwRewardNum > 0))
                    {
                        CUseable useable2 = CUseableManager.CreateUsableByServerType((RES_REWARDS_TYPE)dataByKey.astReward[i].bRewardType, (int)dataByKey.astReward[i].dwRewardNum, dataByKey.astReward[i].dwRewardID);
                        if (useable2 != null)
                        {
                            view.Add(useable2);
                        }
                    }
                }
                CUIListScript component = shareForm.GetWidget(11).GetComponent <CUIListScript>();
                component.SetElementAmount(view.Count);
                for (int j = 0; j < view.Count; j++)
                {
                    CUIListElementScript elemenet = component.GetElemenet(j);
                    if (elemenet != null)
                    {
                        GameObject gameObject = elemenet.gameObject;
                        CUICommonSystem.SetItemCell(shareForm, gameObject, view[j], true, false);
                    }
                }
            }
        }
Example #22
0
 private void _refresh_list(CUIListScript listScript, ListView <COMDT_FRIEND_INFO> data_list, FriendShower.ItemType type, bool bShowNickName, CFriendModel.FriendType friend)
 {
     if (listScript != null)
     {
         int count = data_list.Count;
         listScript.SetElementAmount(count);
         for (int i = 0; i < count; i++)
         {
             CUIListElementScript elemenet = listScript.GetElemenet(i);
             if ((elemenet != null) && listScript.IsElementInScrollArea(i))
             {
                 FriendShower      component = elemenet.GetComponent <FriendShower>();
                 COMDT_FRIEND_INFO info      = data_list[i];
                 if ((component != null) && (info != null))
                 {
                     UT.ShowFriendData(info, component, type, bShowNickName, friend);
                     if (component.sendHeartButton != null)
                     {
                         if (friend == CFriendModel.FriendType.GameFriend)
                         {
                             component.sendHeartBtn_eventScript.m_onClickEventID = enUIEventID.Friend_SendCoin;
                         }
                         else if (friend == CFriendModel.FriendType.SNS)
                         {
                             component.sendHeartBtn_eventScript.m_onClickEventID = enUIEventID.Friend_SNS_SendCoin;
                         }
                         component.sendHeartBtn_eventScript.m_onClickEventParams.commonUInt64Param1 = info.stUin.ullUid;
                         component.sendHeartBtn_eventScript.m_onClickEventParams.commonUInt64Param2 = info.stUin.dwLogicWorldId;
                     }
                 }
             }
         }
     }
 }
        private void Qualifying_RankListSelect(CUIEvent uiEvent)
        {
            int                    selectedIndex          = uiEvent.m_srcWidget.gameObject.GetComponent <CUIListScript>().GetSelectedIndex();
            GameObject             gameObject             = uiEvent.m_srcFormScript.gameObject;
            GameObject             gameObject2            = gameObject.transform.Find("Panel/Panel_RankInfo").gameObject;
            CUIListScript          component              = gameObject2.transform.Find("Panel_Left/ListHeroIno").GetComponent <CUIListScript>();
            CSDT_CLASSOFRANKDETAIL cSDT_CLASSOFRANKDETAIL = this.m_rankList.get_Item(selectedIndex);

            component.SetElementAmount(cSDT_CLASSOFRANKDETAIL.stDetail.astCommonUseHero.Length);
            for (int i = 0; i < cSDT_CLASSOFRANKDETAIL.stDetail.astCommonUseHero.Length; i++)
            {
                GameObject gameObject3 = component.GetElemenet(i).gameObject;
                Image      component2  = gameObject3.transform.Find("heroInfo/imgRank").GetComponent <Image>();
                Text       component3  = gameObject3.transform.Find("heroInfo/lblRank").GetComponent <Text>();
                if (cSDT_CLASSOFRANKDETAIL.stDetail.astCommonUseHero[i].dwHeroId == 0u)
                {
                    gameObject3.CustomSetActive(false);
                }
                else
                {
                    component2.SetSprite(CUIUtility.s_Sprite_System_Qualifying_Dir + "ranking_icon" + cSDT_CLASSOFRANKDETAIL.stDetail.astCommonUseHero[i].bHeroProficiencyLv, uiEvent.m_srcFormScript, true, false, false, false);
                    component3.text = cSDT_CLASSOFRANKDETAIL.stDetail.astCommonUseHero[i].dwHeroProficiency.ToString();
                    gameObject3.CustomSetActive(true);
                }
            }
        }
Example #24
0
        public static void SetInviteFriendData(CUIFormScript form, COM_INVITE_JOIN_TYPE joinType)
        {
            ListView <COMDT_FRIEND_INFO> allFriendList = Singleton <CInviteSystem> .instance.GetAllFriendList();

            int           count     = allFriendList.Count;
            int           num2      = 0;
            CUIListScript component = form.GetWidget(2).GetComponent <CUIListScript>();

            component.SetElementAmount(count);
            form.GetWidget(3).gameObject.CustomSetActive(allFriendList.Count == 0);
            for (int i = 0; i < count; i++)
            {
                CUIListElementScript elemenet = component.GetElemenet(i);
                if ((elemenet != null) && (elemenet.gameObject != null))
                {
                    UpdateFriendListElement(elemenet.gameObject, allFriendList[i]);
                }
                if (allFriendList[i].bIsOnline == 1)
                {
                    num2++;
                }
            }
            string[] args = new string[] { num2.ToString(), count.ToString() };
            form.GetWidget(4).GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Common_Online_Member", args);
        }
        public void RefreshHeroInfo()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CQualifyingSystem.s_qualifyingFormPath);

            if (form == null)
            {
                return;
            }
            ListView <IHeroData> hostHeroList = CHeroDataFactory.GetHostHeroList(true, CMallSortHelper.HeroViewSortType.Name);
            GameObject           gameObject   = form.gameObject.transform.Find("Panel/Panel_HeroInfo").gameObject;
            Text          component           = gameObject.transform.Find("lblProficiency").GetComponent <Text>();
            CUIListScript component2          = gameObject.transform.Find("ListHeroIno").GetComponent <CUIListScript>();

            component2.SetElementAmount(hostHeroList.get_Count());
            for (int i = 0; i < hostHeroList.get_Count(); i++)
            {
                GameObject gameObject2 = component2.GetElemenet(i).gameObject;
                Image      component3  = gameObject2.transform.Find("heroInfo/imgRank").GetComponent <Image>();
                Text       component4  = gameObject2.transform.Find("heroInfo/lblRank").GetComponent <Text>();
                component3.SetSprite(CUIUtility.s_Sprite_System_Qualifying_Dir + "ranking_icon" + hostHeroList.get_Item(i).proficiencyLV, form, true, false, false, false);
                component4.text = hostHeroList.get_Item(i).proficiency.ToString();
            }
            uint num = 0u;

            for (int j = 0; j < hostHeroList.get_Count(); j++)
            {
                num += hostHeroList.get_Item(j).proficiency;
            }
            component.text = CUIUtility.StringReplace(Singleton <CTextManager> .GetInstance().GetText("Qualifying_Title0"), new string[]
            {
                num.ToString()
            });
        }
Example #26
0
        public void RefreshHeroInfo()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_qualifyingFormPath);

            if (form != null)
            {
                ListView <IHeroData> hostHeroList = CHeroDataFactory.GetHostHeroList(true);
                GameObject           gameObject   = form.gameObject.transform.Find("Panel/Panel_HeroInfo").gameObject;
                Text          component           = gameObject.transform.Find("lblProficiency").GetComponent <Text>();
                CUIListScript script2             = gameObject.transform.Find("ListHeroIno").GetComponent <CUIListScript>();
                script2.SetElementAmount(hostHeroList.Count);
                for (int i = 0; i < hostHeroList.Count; i++)
                {
                    GameObject obj3  = script2.GetElemenet(i).gameObject;
                    Image      image = obj3.transform.Find("heroInfo/imgRank").GetComponent <Image>();
                    Text       text2 = obj3.transform.Find("heroInfo/lblRank").GetComponent <Text>();
                    image.SetSprite(CUIUtility.s_Sprite_System_Qualifying_Dir + "ranking_icon" + hostHeroList[i].proficiencyLV, form, true, false, false);
                    text2.text = hostHeroList[i].proficiency.ToString();
                }
                uint num2 = 0;
                for (int j = 0; j < hostHeroList.Count; j++)
                {
                    num2 += hostHeroList[j].proficiency;
                }
                string[] values = new string[] { num2.ToString() };
                component.text = CUIUtility.StringReplace(Singleton <CTextManager> .GetInstance().GetText("Qualifying_Title0"), values);
            }
        }
        private void RefreshRewardList(CUIFormScript form, CUIListScript listScript, ref ResDT_RandomRewardInfo[] rewardInfoArr, int index = 0)
        {
            if (form == null || listScript == null)
            {
                return;
            }
            int num = 0;

            for (int i = index; i < rewardInfoArr.Length; i++)
            {
                if (rewardInfoArr[i].bItemType == 0)
                {
                    break;
                }
                num++;
            }
            listScript.SetElementAmount(num);
            for (int j = 0; j < num; j++)
            {
                CUIListElementScript elemenet    = listScript.GetElemenet(j);
                CUseable             itemUseable = CUseableManager.CreateUsableByRandowReward((RES_RANDOM_REWARD_TYPE)rewardInfoArr[j + index].bItemType, (int)rewardInfoArr[j + index].dwLowCnt, rewardInfoArr[j + index].dwItemID);
                GameObject           gameObject  = elemenet.transform.Find("itemCell").gameObject;
                CUICommonSystem.SetItemCell(form, gameObject, itemUseable, true, false, false, false);
            }
        }
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
        }
        else
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CSymbolSystem.s_symbolFormPath);

            if (form != null)
            {
                int       index     = base.currentConf.Param[0];
                string    name      = "Panel_SymbolMake/symbolMakeList";
                Transform transform = form.transform.FindChild(name);
                if (transform != null)
                {
                    CUIListScript component = transform.gameObject.GetComponent <CUIListScript>();
                    if (component != null)
                    {
                        CUIListElementScript elemenet = component.GetElemenet(index);
                        if (elemenet != null)
                        {
                            GameObject gameObject = elemenet.gameObject;
                            if (gameObject.activeInHierarchy)
                            {
                                base.AddHighLightGameObject(gameObject, true, form, true, new GameObject[0]);
                                base.Initialize();
                            }
                        }
                    }
                }
            }
        }
    }
Example #29
0
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
            return;
        }
        CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CHeroSelectNormalSystem.s_heroSelectFormPath);

        if (form != null)
        {
            if (form.gameObject.transform.Find("PanelLeft/ListHostHeroInfoFull").gameObject.activeSelf)
            {
                MonoSingleton <NewbieGuideManager> .GetInstance().StopCurrentGuide();

                return;
            }
            GameObject gameObject = form.transform.FindChild("Other/SkillList").gameObject;
            if (gameObject != null)
            {
                CUIListScript component   = gameObject.GetComponent <CUIListScript>();
                GameObject    gameObject2 = component.GetElemenet(0).transform.FindChild("heroSkillItemCell").gameObject;
                if (gameObject2 != null)
                {
                    base.AddHighLightGameObject(gameObject2, true, form, true);
                    Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.HeroSelect_Skill_Down, new CUIEventManager.OnUIEventHandler(this.onDownHandler));

                    Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.HeroSelect_Skill_Up, new CUIEventManager.OnUIEventHandler(this.onUpHandler));

                    base.Initialize();
                }
            }
        }
    }
Example #30
0
        public GameObject GetGuideItem()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_bagFormPath);

            if (form == null)
            {
                return(null);
            }
            CUseableContainer selectUseableContainer = this.m_selectUseableContainer;

            for (int i = 0; i < selectUseableContainer.GetCurUseableCount(); i++)
            {
                CUseable useableByIndex = selectUseableContainer.GetUseableByIndex(i);
                if (useableByIndex.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP)
                {
                    CItem item = useableByIndex as CItem;
                    if ((item.m_itemData.bClass == 1) && (item.m_itemData.bType == 1))
                    {
                        CUIListScript component = form.gameObject.transform.Find("Panel_Right/List").gameObject.GetComponent <CUIListScript>();
                        if (component.GetElementAmount() > i)
                        {
                            return(component.GetElemenet(i).gameObject.transform.Find("itemCell").gameObject);
                        }
                    }
                }
            }
            return(null);
        }