Beispiel #1
0
        private void OnInvite_TabChange(CUIEvent uiEvent)
        {
            CUIFormScript srcFormScript = uiEvent.m_srcFormScript;
            CUIListScript component     = uiEvent.m_srcWidget.GetComponent <CUIListScript>();
            GameObject    widget        = srcFormScript.GetWidget(0);
            GameObject    obj3          = srcFormScript.GetWidget(1);

            if (component.GetSelectedIndex() == 0)
            {
                widget.CustomSetActive(true);
                obj3.CustomSetActive(false);
            }
            else
            {
                obj3.CustomSetActive(true);
                widget.CustomSetActive(false);
                if (this.m_isFirstlySelectGuildMemberTab)
                {
                    this.InitAllGuildMemberList();
                    this.SendGetGuildMemberGameStateReq();
                    CUITimerScript script3 = srcFormScript.GetWidget(8).GetComponent <CUITimerScript>();
                    script3.SetTotalTime(1000f);
                    script3.SetOnChangedIntervalTime(10f);
                    script3.StartTimer();
                    this.m_isFirstlySelectGuildMemberTab = false;
                }
            }
        }
        private void RefreshRenewalPanel()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CPaySystem.s_renewalDianQuanFormPath);

            if (form == null)
            {
                return;
            }
            uint dwConfValue = GameDataMgr.globalInfoDatabin.GetDataByKey(61u).dwConfValue;
            ResRandomRewardStore dataByKey = GameDataMgr.randomRewardDB.GetDataByKey(dwConfValue);
            Transform            transform = form.transform.Find("Panel_Renewal/bodyPanel");
            Text component = transform.Find("rewardDescText").GetComponent <Text>();

            component.set_text(StringHelper.UTF8BytesToString(ref dataByKey.szRewardDesc));
            GameObject gameObject  = transform.Find("itemCellFirst").gameObject;
            CUseable   itemUseable = CUseableManager.CreateUsableByRandowReward((RES_RANDOM_REWARD_TYPE)dataByKey.astRewardDetail[0].bItemType, (int)dataByKey.astRewardDetail[0].dwLowCnt, dataByKey.astRewardDetail[0].dwItemID);

            CUICommonSystem.SetItemCell(form, gameObject, itemUseable, true, false, false, false);
            CUIListScript component2 = transform.Find("List").GetComponent <CUIListScript>();

            this.RefreshRewardList(form, component2, ref dataByKey.astRewardDetail, 1);
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            bool       flag        = masterRoleInfo.IsGuidedStateSet(24);
            bool       flag2       = masterRoleInfo.IsGuidedStateSet(25);
            GameObject gameObject2 = transform.Find("payButton").gameObject;
            GameObject gameObject3 = transform.Find("getButton").gameObject;

            CUICommonSystem.SetButtonName(gameObject2, Singleton <CTextManager> .GetInstance().GetText("Pay_Btn_Top_Up"));
            gameObject2.CustomSetActive(!flag);
            CUICommonSystem.SetButtonName(gameObject3, Singleton <CTextManager> .GetInstance().GetText("Pay_Btn_Get_Reward"));
            gameObject3.CustomSetActive(flag && !flag2);
        }
    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();
            }
        }
    }
        public void OnCommonHeroSubListClick(CUIEvent uiEvent)
        {
            CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CPlayerCommonHeroInfoController.sPlayerInfoCommonHeroFormPath);

            if (form == null)
            {
                return;
            }
            GameObject    widget          = form.GetWidget(0);
            CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(widget, "SubMenuList/List");
            int           selectedIndex   = componetInChild.GetSelectedIndex();
            byte          gameType        = CPlayerCommonHeroInfoController.GetGameType(selectedIndex);

            this.m_commonHeroList.Clear();
            ListView <COMDT_MOST_USED_HERO_INFO> listView = Singleton <CPlayerInfoSystem> .get_instance().GetProfile().MostUsedHeroList();

            for (int i = 0; i < listView.get_Count(); i++)
            {
                int num = 0;
                while ((long)num < (long)((ulong)listView.get_Item(i).stStatisticDetail.dwNum))
                {
                    if ((gameType == 0 || listView.get_Item(i).stStatisticDetail.astTypeDetail[num].bGameType == gameType) && listView.get_Item(i).stStatisticDetail.astTypeDetail[num].dwWinNum + listView.get_Item(i).stStatisticDetail.astTypeDetail[num].dwLoseNum > 0u)
                    {
                        this.m_commonHeroList.Add(listView.get_Item(i));
                        break;
                    }
                    num++;
                }
            }
            this.UpdateUI();
        }
        private void OnSymbolRcmdLevelChange(CUIEvent uiEvent)
        {
            CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>();

            this.m_symbolRcmdLevel = (ushort)(component.GetSelectedIndex() + 1);
            this.RefreshRcmdSymbolListPanel();
        }
        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()
            });
        }
Beispiel #7
0
        private void OnLoadSubModule(CUIEvent uiEvent)
        {
            CUIFormScript srcFormScript = uiEvent.m_srcFormScript;

            if (srcFormScript != null)
            {
                if (uiEvent.m_srcWidget != null)
                {
                    uiEvent.m_srcWidget.CustomSetActive(false);
                }
                if (srcFormScript.transform.Find(s_symbolEquipPanel) == null)
                {
                    CUICommonSystem.LoadUIPrefab(s_symbolEquipModulePath, s_symbolEquipPanel, srcFormScript.gameObject, srcFormScript);
                    Transform transform = srcFormScript.transform.Find(s_symbolEquipPanel);
                    if (transform != null)
                    {
                        transform.SetSiblingIndex(2);
                        GameObject widget = srcFormScript.GetWidget(0);
                        if (widget != null)
                        {
                            CUIListScript component = widget.transform.GetComponent <CUIListScript>();
                            component.SelectElement(-1, false);
                            component.SelectElement((int)this.m_selectMenuType, true);
                        }
                    }
                }
            }
        }
        public static void SetLBSData(CUIFormScript form, COM_INVITE_JOIN_TYPE joinType)
        {
            CUIListScript component     = form.GetWidget(11).GetComponent <CUIListScript>();
            Text          component2    = form.GetWidget(12).GetComponent <Text>();
            int           elementAmount = 0;

            if (Singleton <CFriendContoller> .instance.model.EnableShareLocation)
            {
                ListView <CSDT_LBS_USER_INFO> lBSList = Singleton <CFriendContoller> .instance.model.GetLBSList(CFriendModel.LBSGenderType.Both);

                elementAmount = ((lBSList != null) ? lBSList.Count : 0);
                component.SetElementAmount(elementAmount);
                Utility.FindChild(form.GetWidget(10), "Empty/Normal").CustomSetActive(true);
                Utility.FindChild(form.GetWidget(10), "Empty/GotoBtn").CustomSetActive(false);
            }
            else
            {
                component.SetElementAmount(0);
                Utility.FindChild(form.GetWidget(10), "Empty/Normal").CustomSetActive(false);
                Utility.FindChild(form.GetWidget(10), "Empty/GotoBtn").CustomSetActive(true);
            }
            component2.set_text(Singleton <CTextManager> .GetInstance().GetText("Common_Online_Member", new string[]
            {
                elementAmount.ToString(),
                elementAmount.ToString()
            }));
        }
Beispiel #9
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 AutoMoveBannerImage()
 {
     if (this.m_UIListScript)
     {
         CUIListScript uIListScript = this.m_UIListScript;
         if (uIListScript)
         {
             int elementAmount = uIListScript.GetElementAmount();
             if (this.m_CurIdxImagePage < 0)
             {
                 this.m_CurIdxImagePage = 0;
                 this.m_fAdd            = 1;
             }
             this.m_CurIdxImagePage += this.m_fAdd;
             if (this.m_CurIdxImagePage >= elementAmount)
             {
                 this.m_CurIdxImagePage = elementAmount - 1;
             }
             if (this.m_CurIdxImagePage == elementAmount - 1)
             {
                 this.m_fAdd = -1;
             }
             if (this.m_CurIdxImagePage < 0)
             {
                 this.m_CurIdxImagePage = 0;
             }
             if (this.m_CurIdxImagePage == 0)
             {
                 this.m_fAdd = 1;
             }
         }
         uIListScript.MoveElementInScrollArea(this.m_CurIdxImagePage, false);
         this.EnablePickObj(this.m_CurIdxImagePage);
     }
 }
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
            return;
        }
        CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CAdventureSys.ADVENTURE_SELECT_FORM);

        if (form != null)
        {
            CUIListScript component = form.transform.FindChild("LevelList").GetComponent <CUIListScript>();
            component.SelectElement(0, true);
            CUIEvent uIEvent = Singleton <CUIEventManager> .GetInstance().GetUIEvent();

            uIEvent.m_eventParams.tag = 1;
            uIEvent.m_eventID         = enUIEventID.Adv_SelectLevel;
            uIEvent.m_srcFormScript   = form;
            Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(uIEvent);

            Transform transform = form.transform.FindChild("ButtonEnter");
            if (transform != null)
            {
                GameObject gameObject = transform.gameObject;
                if (gameObject.activeInHierarchy)
                {
                    base.AddHighLightGameObject(gameObject, true, form, true);
                    base.Initialize();
                }
            }
        }
    }
Beispiel #12
0
        private void OnFormClosed(CUIEvent uiEvt)
        {
            Singleton <CBattleSystem> .GetInstance().OnFormClosed();

            this.UnRegisterEvents();
            if (this._heroWrapDict != null)
            {
                this._heroWrapDict.Clear();
                this._heroWrapDict = null;
            }
            if (this._scoreHud != null)
            {
                this._scoreHud.Clear();
                this._scoreHud = null;
            }
            if (this._heroInfoHud != null)
            {
                this._heroInfoHud.Clear();
                this._heroInfoHud = null;
            }
            if (this._replayControl != null)
            {
                this._replayControl.Clear();
                this._replayControl = null;
            }
            this._camp1List      = null;
            this._camp2List      = null;
            this._camp1BaseList  = null;
            this._camp1EquipList = null;
            this._camp2BaseList  = null;
            this._camp2EquipList = null;
            this._hideBtn        = null;
            this._showBtn        = null;
            this._form           = null;
        }
Beispiel #13
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();
                    }
                }
            }
        }
Beispiel #14
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;
                }
            }
        }
        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);
                }
            }
        }
        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);
                }
            }
        }
        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;
        }
Beispiel #18
0
        public void Clear()
        {
            if (this.m_useSignalButton)
            {
                Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_ClickMiniMap, new CUIEventManager.OnUIEventHandler(this.OnClickMiniMap));

                Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_Click_Scene, new CUIEventManager.OnUIEventHandler(this.OnClickBattleScene));

                Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_OnSignalButtonClicked, new CUIEventManager.OnUIEventHandler(this.OnSignalButtonClicked));

                Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Battle_OnSignalTipsListElementEnable, new CUIEventManager.OnUIEventHandler(this.OnSignalListElementEnabled));

                this.m_signals = null;
                this.m_playerSignalCooldowns = null;
                this.m_signalTipses          = null;
            }
            Singleton <GameEventSys> .instance.RmvEventHandler <SpawnSoldierParam>(GameEventDef.Event_SpawnSoldier, new RefAction <SpawnSoldierParam>(this.OnSpawnSoldier));

            this.m_signalButtons = null;
            this.m_formScript    = null;
            this.m_miniMap       = null;
            this.m_signalSrcHeroNameContainer = null;
            this.m_signalTipsList             = null;
            Singleton <CUIManager> .GetInstance().CloseForm(SignalPanel.s_signalTipsFormPath);
        }
    public void Open(CustomMailType mailType)
    {
        this.m_CUIForm = Singleton <CUIManager> .GetInstance().OpenForm(CMailSys.MAIL_FORM_PATH, false, true);

        if (this.m_CUIForm == null)
        {
            return;
        }
        this.m_CUIListScriptTab = this.m_CUIForm.transform.FindChild("TopCommon/Panel_Menu/ListMenu").GetComponent <CUIListScript>();
        this.m_CUIListScriptTab.SetElementAmount(4);
        this.m_CUIListScriptTab.GetElemenet(0).transform.FindChild("Text").GetComponent <Text>().set_text(Singleton <CTextManager> .GetInstance().GetText("Mail_Friend"));
        this.m_CUIListScriptTab.GetElemenet(1).transform.FindChild("Text").GetComponent <Text>().set_text(Singleton <CTextManager> .GetInstance().GetText("Mail_System"));
        this.m_CUIListScriptTab.GetElemenet(2).transform.FindChild("Text").GetComponent <Text>().set_text(Singleton <CTextManager> .GetInstance().GetText("Mail_MsgCenter"));
        this.m_CUIListScriptTab.GetElemenet(3).transform.FindChild("Text").GetComponent <Text>().set_text(Singleton <CTextManager> .GetInstance().GetText("Mail_Ask_For_Tab"));
        this.m_CUIListScriptTab.GetElemenet(0).GetComponent <CUIEventScript>().SetUIEvent(enUIEventType.Click, enUIEventID.Mail_TabFriend);
        this.m_CUIListScriptTab.GetElemenet(1).GetComponent <CUIEventScript>().SetUIEvent(enUIEventType.Click, enUIEventID.Mail_TabSystem);
        this.m_CUIListScriptTab.GetElemenet(2).GetComponent <CUIEventScript>().SetUIEvent(enUIEventType.Click, enUIEventID.Mail_TabMsgCenter);
        this.m_CUIListScriptTab.GetElemenet(3).GetComponent <CUIEventScript>().SetUIEvent(enUIEventType.Click, enUIEventID.Mail_TabGiftCenter);
        this.m_panelFri                 = this.m_CUIForm.transform.FindChild("PanelFriMail").gameObject;
        this.m_panelSys                 = this.m_CUIForm.transform.FindChild("PanelSysMail").gameObject;
        this.m_panelMsg                 = this.m_CUIForm.transform.FindChild("PanelMsgMail").gameObject;
        this.m_panelAskFor              = this.m_CUIForm.transform.FindChild("PanelAskForMail").gameObject;
        this.m_SysDeleteBtn             = this.m_panelSys.transform.FindChild("ButtonGrid/DeleteButton").gameObject;
        this.m_AskForDeleteBtn          = this.m_panelAskFor.transform.FindChild("ButtonGrid/DeleteButton").gameObject;
        this.m_allReceiveSysButton      = this.m_panelSys.transform.FindChild("ButtonGrid/AllReceiveButton").gameObject;
        this.m_allReceiveFriButton      = this.m_panelFri.transform.FindChild("AllReceiveButton").gameObject;
        this.m_allDeleteMsgCenterButton = this.m_panelMsg.transform.FindChild("AllDeleteButton").gameObject;
        this.SetUnReadNum(CustomMailType.FRIEND, this.m_friUnReadNum);
        this.SetUnReadNum(CustomMailType.SYSTEM, this.m_sysUnReadNum);
        this.SetUnReadNum(CustomMailType.FRIEND_INVITE, this.m_msgUnReadNum);
        this.SetUnReadNum(CustomMailType.ASK_FOR, this.m_askForUnReadNum);
        this.CurMailType = mailType;
    }
Beispiel #20
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();
                        }
                    }
                }
            }
        }
    }
        public void InitCommonHeroUI()
        {
            CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CPlayerInfoSystem.sPlayerInfoFormPath);

            if (form == null)
            {
                return;
            }
            CPlayerProfile profile = Singleton <CPlayerInfoSystem> .get_instance().GetProfile();

            GameObject widget = form.GetWidget(7);

            if (widget == null)
            {
                return;
            }
            CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(widget, "BaseList");

            if (componetInChild == null)
            {
                return;
            }
            int  num         = profile.MostUsedHeroList().get_Count();
            uint dwConfValue = GameDataMgr.globalInfoDatabin.GetDataByKey(178u).dwConfValue;

            if ((long)num > (long)((ulong)dwConfValue))
            {
                num = (int)dwConfValue;
            }
            componetInChild.SetElementAmount(num);
        }
Beispiel #22
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);
                    }
                }
            }
        }
Beispiel #23
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();
                            }
                        }
                    }
                }
            }
        }
    }
        private void ResetTeamFightDataByData()
        {
            bool flag = this.m_teamFightDataStart >= 0 && this.m_teamFightDataEnd >= 0 && this.m_teamFightSelectType >= 0;

            this.teamFightListGo.transform.Find("info_node").gameObject.CustomSetActive(!flag);
            GameObject gameObject  = this.teamFightListGo.transform.Find("CampInfoList_1").gameObject;
            GameObject gameObject2 = this.teamFightListGo.transform.Find("CampInfoList_2").gameObject;
            GameObject widget      = this.m_form.GetWidget(12);

            gameObject.CustomSetActive(flag);
            gameObject2.CustomSetActive(flag);
            widget.CustomSetActive(flag);
            int teamFightSelectType = this.m_teamFightSelectType;

            if (flag)
            {
                int[] result       = new int[this.m_heroListCamp1.get_Count()];
                int[] result2      = new int[this.m_heroListCamp2.get_Count()];
                int   totalResult  = 0;
                int   totalResult2 = 0;
                this.CountTeamFightDataResult(this.m_heroListCamp1, this.m_teamFightDataCamp1, teamFightSelectType, ref result, ref totalResult);
                this.CountTeamFightDataResult(this.m_heroListCamp2, this.m_teamFightDataCamp2, teamFightSelectType, ref result2, ref totalResult2);
                widget.transform.Find("LeftValue").GetComponent <Text>().set_text(totalResult.ToString());
                widget.transform.Find("RightValue").GetComponent <Text>().set_text(totalResult2.ToString());
                widget.transform.Find("Title").GetComponent <Text>().set_text(Singleton <CTextManager> .GetInstance().GetText(this.K_TEAMFIGHT_TITLES[teamFightSelectType]));
                CUIListScript component  = gameObject.GetComponent <CUIListScript>();
                CUIListScript component2 = gameObject2.GetComponent <CUIListScript>();
                this.SetTeamFightDisplay(component, this.m_heroListCamp1, result, totalResult, teamFightSelectType == 1);
                this.SetTeamFightDisplay(component2, this.m_heroListCamp2, result2, totalResult2, teamFightSelectType == 1);
            }
        }
        private void RefreshFirstPayPanel()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CPaySystem.s_firstPayFormPath);

            if (form == null)
            {
                return;
            }
            uint dwConfValue = GameDataMgr.globalInfoDatabin.GetDataByKey(60u).dwConfValue;
            ResRandomRewardStore dataByKey = GameDataMgr.randomRewardDB.GetDataByKey(dwConfValue);
            Transform            transform = form.transform.Find("Panel_FirstPay/bodyPanel");
            CUIListScript        component = transform.Find("rewardList").GetComponent <CUIListScript>();

            this.RefreshRewardList(form, component, ref dataByKey.astRewardDetail, 0);
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            bool       flag        = masterRoleInfo.IsGuidedStateSet(22);
            bool       flag2       = masterRoleInfo.IsGuidedStateSet(23);
            GameObject gameObject  = transform.Find("payButton").gameObject;
            GameObject gameObject2 = transform.Find("getButton").gameObject;

            CUICommonSystem.SetButtonName(gameObject, Singleton <CTextManager> .GetInstance().GetText("Pay_Btn_Top_Up"));
            gameObject.CustomSetActive(!flag);
            CUICommonSystem.SetButtonName(gameObject2, Singleton <CTextManager> .GetInstance().GetText("Pay_Btn_Get_Reward"));
            gameObject2.CustomSetActive(flag && !flag2);
        }
 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) + "%");
     }
 }
        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);
            }
        }
Beispiel #28
0
    protected override void Update()
    {
        if (base.isInitialize)
        {
            base.Update();
            return;
        }
        CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CTaskSys.TASK_FORM_PATH);

        if (form != null)
        {
            CTaskView taskView = Singleton <CTaskSys> .GetInstance().GetTaskView();

            if (taskView != null)
            {
                taskView.On_Tab_Change(0);
                CUIListScript component = form.GetWidget(2).GetComponent <CUIListScript>();
                component.SelectElement(0, true);
                GameObject gameObject = form.GetWidget(2).transform.FindChild("ScrollRect/Content").gameObject;
                if (gameObject != null)
                {
                    base.AddHighLightAreaClickAnyWhere(gameObject, form);
                    base.Initialize();
                }
            }
        }
    }
Beispiel #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();
                }
            }
        }
    }
    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();
                            }
                        }
                    }
                }
            }
        }
    }