コード例 #1
0
        public virtual void SetPopupAction(bool bIsCap)
        {
            if (bIsCap)
            {
                PopupAction = new UPopupAction();
                PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(nPDBID));
                PopupAction.Add(UPopupItemDataAddFriend.GetDescString(), new UPopupItemDataAddFriend(nUserID, Name.text));
                PopupAction.Add(UPopupItemDataTeamShield.GetDescString(), new UPopupItemDataTeamShield(nPDBID));
                //PopupAction.Add(UPopupItemDataTeamReport.GetDescString(), new UPopupItemDataTeamReport(nPDBID));
            }
            else
            {
                PopupAction = new UPopupAction();
                PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(nPDBID));
                PopupAction.Add(UPopupItemDataAddFriend.GetDescString(), new UPopupItemDataAddFriend(nUserID, Name.text));
                PopupAction.Add(UPopupItemDataTeamAppointCaptain.GetDescString(), new UPopupItemDataTeamAppointCaptain(nPDBID));
                PopupAction.Add(UPopupItemDataTeamKickout.GetDescString(), new UPopupItemDataTeamKickout(nPDBID));
                PopupAction.Add(UPopupItemDataTeamShield.GetDescString(), new UPopupItemDataTeamShield(nPDBID));
                //PopupAction.Add(UPopupItemDataTeamReport.GetDescString(), new UPopupItemDataTeamReport(nPDBID));
            }

            if (PopupMenuHandle == null)
            {
                PopupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
            }
            PopupMenuHandle.HandlePopupAction = PopupAction;
        }
コード例 #2
0
        public void ShowHighLadderInfo(HighLadderArray ladderArray)
        {
            ListLadder.OnSelect.RemoveListener(onSelectLadder);
            ListLadder.onRightClick.RemoveListener(onSelectLadder);
            ListLadder.DataSource.Clear();
            UIWidgets.ObservableList <UListItemLadder> dataSource = new UIWidgets.ObservableList <UListItemLadder>();

            for (int i = 0; i < ladderArray.nLadderCount; i++)
            {
                UListItemLadder item = new UListItemLadder();
                item.OrderID      = ladderArray.allLadderInfo[i].OrderID;
                item.nPDBID       = ladderArray.allLadderInfo[i].nPDBID;
                item.PlayerName   = ladderArray.allLadderInfo[i].PlayerName;
                item.RankGrade    = ladderArray.allLadderInfo[i].RankGrade;
                item.RankScore    = ladderArray.allLadderInfo[i].RankScore;
                item.RankGradeDes = ladderArray.allLadderInfo[i].RankGradeDes;
                PopupAction       = new UPopupAction();
                PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(item.nPDBID));
                item.PopupAction = PopupAction;

                dataSource.Add(item);
            }

            ListLadder.DataSource = dataSource;
            ListLadder.OnSelect.AddListener(onSelectLadder);
            ListLadder.onRightClick.AddListener(onSelectLadder);
        }
コード例 #3
0
ファイル: LegendCupKinInfoWnd.cs プロジェクト: zwong91/Titan
        public void OnOfflineTogChanged(bool bSelect)
        {
            CurSelectItem = null;

            ListKinMember.DataSource.BeginUpdate();
            ListKinMember.DataSource.Clear();
            List <cmd_kin_membernode> KinMemberList = LogicDataCenter.kinDataManager.LegendKinMemberList;

            for (int i = 0; i < KinMemberList.Count; ++i)
            {
                cmd_kin_membernode cmdNodeData = KinMemberList[i];
                UListItemKinMember item        = new UListItemKinMember();
                Toggle             tOffLineTog = OffLineTog.GetComponent <Toggle>();
                if (!tOffLineTog.isOn && cmdNodeData.bIsOnline == 0)
                {
                    // 隐藏不在线玩家
                    continue;
                }
                item.IdentityID  = cmdNodeData.nIdentity;
                item.PlayerID    = cmdNodeData.dwPDBID;
                item.GradIcon   += cmdNodeData.szGradeName;
                item.PersonIcon  = cmdNodeData.nFaceID;
                item.PersonName += cmdNodeData.szName;
                item.Power       = cmdNodeData.dwBattleVal;
                item.PowerRank  += cmdNodeData.dwBVOrder;
                item.GameState   = cmdNodeData.byGameState;
                item.Level      += cmdNodeData.nLevel;
                item.isOnline    = cmdNodeData.bIsOnline;
                item.nSex        = cmdNodeData.nSex;
                item.nLastOrder  = cmdNodeData.dwLastOrder;
                item.nBVOrder    = cmdNodeData.dwBVOrder;
                PopupAction      = new UPopupAction();
                if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) != item.PlayerID)
                {
                    PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(item.PlayerID));
                    PopupAction.Add(UPopupItemDataTeamInvite.GetDescString(), new UPopupItemDataTeamInvite(item.PlayerID));
                    PopupAction.Add(UPopupItemDataTeamRequest.GetDescString(), new UPopupItemDataTeamRequest(item.PlayerID));
                }
                item.PopupAction = PopupAction;

                ListKinMember.DataSource.Add(item);
            }

            // 排序
            IEnumerable <UListItemKinMember> ListQuery = from item in ListKinMember.DataSource
                                                         orderby item.isOnline descending, item.IdentityID descending, item.Power descending
            select item;

            UIWidgets.ObservableList <UListItemKinMember> dataSource = new UIWidgets.ObservableList <UListItemKinMember>();
            foreach (UListItemKinMember Item in ListQuery)
            {
                dataSource.Add(Item);
            }

            ListKinMember.DataSource = dataSource;
            ListKinMember.DataSource.EndUpdate();
        }
コード例 #4
0
        public void SetData(cmd_entity_kill_order_info info)
        {
            index.text = info.nOrderID.ToString();

            playerName.text    = info.szName;
            fiveKillCount.text = info.n5KillNum.ToString();
            rankIcon.sprite    = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankImage, WndID.WND_ID_CHART, 2, info.nRankIconID);
            rankIcon.gameObject.SetActive(true);
            rankDesc.text = info.szGradeName;
            clanName.text = info.szClanName;

            sexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_CHART, (int)info.bySex + 1);
            sexIcon.gameObject.SetActive(true);

            if (popupMenuHandle == null)
            {
                popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
            }

            UPopupAction PopupAction = new UPopupAction();

            PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail((int)info.nPDBID));

            popupMenuHandle.HandlePopupAction = PopupAction;

            bool bTop3 = false;

            //如果是前3,加牛逼框框
            if (info.nOrderID == 1 || info.nOrderID == 2 || info.nOrderID == 3)
            {
                bTop3 = true;
                indexIcon.gameObject.SetActive(true);
                indexIcon.sprite = top3IndexIcons[info.nOrderID - 1];
                index.gameObject.SetActive(false);
            }

            if (!U3D_Render.EntityView.isNullOrEmpty(EntityFactory.MainHeroView))
            {
                if (EntityFactory.MainHeroView.Property)
                {
                    if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) == info.nPDBID)
                    {
                        bSelfItem        = true;
                        borderImg.sprite = borderList[1];
                    }
                }
            }

            Color txtColor = bTop3 ? top3TextColor[info.nOrderID - 1] : Color.white;

            index.color         = txtColor;
            playerName.color    = txtColor;
            fiveKillCount.color = txtColor;
            rankDesc.color      = txtColor;
            clanName.color      = txtColor;
        }
コード例 #5
0
        public void SetData(cmd_entity_skin_order_info info)
        {
            index.text = info.nOrder.ToString();

            playerName.text   = info.szName;
            skinNums.text     = info.dwSkinCount.ToString();
            assetNums[0].text = info.dwLegendSkinCount.ToString();
            assetNums[1].text = info.dwEpicSkinCount.ToString();
            assetNums[2].text = info.dwLimitedSkinCount.ToString();

            sexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_CHART, (int)info.bySex + 1);
            sexIcon.gameObject.SetActive(true);

            if (popupMenuHandle == null)
            {
                popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
            }

            UPopupAction PopupAction = new UPopupAction();

            PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail((int)info.dwPDBID));

            popupMenuHandle.HandlePopupAction = PopupAction;

            bool bTop3 = false;

            if (info.nOrder == 1 || info.nOrder == 2 || info.nOrder == 3)
            {
                bTop3 = true;
                indexIcon.gameObject.SetActive(true);
                indexIcon.sprite = top3IndexIcons[info.nOrder - 1];
                index.gameObject.SetActive(false);
            }

            if (!U3D_Render.EntityView.isNullOrEmpty(EntityFactory.MainHeroView))
            {
                if (EntityFactory.MainHeroView.Property)
                {
                    if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) == info.dwPDBID)
                    {
                        bSelfItem        = true;
                        borderImg.sprite = borderList[1];
                    }
                }
            }

            Color txtColor = bTop3 ? top3TextColor[info.nOrder - 1] : Color.white;

            index.color      = txtColor;
            playerName.color = txtColor;
            skinNums.color   = txtColor;
            foreach (Text txt in assetNums)
            {
                txt.color = txtColor;
            }
        }
コード例 #6
0
ファイル: MentorshipPersonWnd.cs プロジェクト: zwong91/Titan
        public void SetData(cmd_mentorship_personshipinfo data)
        {
            m_MentorshipID = data.nMentorshipID;
            m_DesPDBID     = data.nPDBID;
            m_MasterName   = data.szName;

            if (data.nRelationType == (int)EMMentorshipType.emMentorshipType_Formal)
            {
                fMasterIcon.enabled = true;
                fMasterIcon.sprite  = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_MentorshipMaster, "MasterIcon_1", WndID.WND_ID_SOCIALCONTACT);

                posDesc.text = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "FormalPosDesc");
            }
            else
            {
                fMasterIcon.enabled = false;
                posDesc.text        = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "InnerPosDesc");
            }

            if (popupMenuHandle == null)
            {
                popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
            }

            UPopupAction popupAction = new UPopupAction();

            popupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(m_DesPDBID));

            if (data.nIsOnline == 0)
            {
                string szLeaveLineDesc = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "LeaveLineNameDesc");
                szLeaveLineDesc = szLeaveLineDesc.Replace("{1}", data.szName);
                name.text       = szLeaveLineDesc;
            }
            else
            {
                name.text = data.szName;
                popupAction.Add(UPopupItemDataPrivateChat.GetDescString(), new UPopupItemDataPrivateChat(m_MasterName));
                if (data.nRelationType != (int)EMMentorshipType.emMentorshipType_Formal && !LogicDataCenter.mentorshipDataManager.IsFormalMasterFull())
                {
                    popupAction.Add(UPopupItemDataApplyFormalPrentice.GetDescString(), new UPopupItemDataApplyFormalPrentice(m_DesPDBID));
                }
            }

            if (data.nSeverPDBID == 0 || data.nPDBID == data.nSeverPDBID)
            {
                popupAction.Add(UPopupItemDataDismissMentorship.GetDescString(), new UPopupItemDataDismissMentorship(m_MentorshipID));
            }

            popupMenuHandle.HandlePopupAction = popupAction;

            gameObject.SetActive(true);
        }
コード例 #7
0
        // 查看玩家
        private void ProcessViewPlayer(int nEntityID)
        {
            uint nPDBID = GameLogicAPI.getPlayerPDBID(nEntityID);

            if (nPDBID == 0)
            {
                return;
            }

            UListComponentItemDataPopup item = new UPopupItemDataGetPlayerDetail((int)nPDBID, _strItemTypeName: UPopupItemDataGetPlayerDetail.GetDescString());

            PopupMenuDataManager.Instance.SetPopupItemData(m_viewPlayerRegistInfo, ref item);
        }
コード例 #8
0
        public void SetData(cmd_mentorship_issueinfo data)
        {
            m_PersonPDBID  = data.nPDBID;
            name.text      = data.szName;
            level.text     = data.nLevel.ToString();
            stateDesc.text = "";
            corpsName.text = (data.szCorpsName == "" ? "暂无" : data.szCorpsName);
            clanName.text  = (data.szClanName == "" ? "暂无" : data.szClanName);
            issueInfo.text = (data.szIssueInfo == "" ? "暂无留言" : data.szIssueInfo);

            bgIcon.gameObject.SetActive(true);

            SetIssueItemStateDesc(LogicDataCenter.mentorshipDataManager.IsPApplyFreezing(m_PersonPDBID));

            if (data.bySex < (int)PERSON_SEX.SEX_MAX && data.bySex >= (int)PERSON_SEX.SEX_MALE)
            {
                sexIcon.enabled = true;
                sexIcon.sprite  = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_SOCIALCONTACT, data.bySex + 1);
            }
            else
            {
                sexIcon.enabled = false;
            }

            if (EntityFactory.MainHeroView != null && EntityFactory.MainHeroView.Property != null)
            {
                if (m_PersonPDBID == EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID))
                {
                    m_bIsSelf = true;
                    //bgIcon.sprite = selfBgBorder;
                    bgIcon.gameObject.SetActive(true);
                }
            }

            if (!m_bIsSelf)
            {
                if (popupMenuHandle == null)
                {
                    popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
                }

                UPopupAction popupAction = new UPopupAction();
                popupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(m_PersonPDBID));
                popupAction.Add(UPopupItemDataPrivateChat.GetDescString(), new UPopupItemDataPrivateChat(data.szName));
                popupMenuHandle.HandlePopupAction = popupAction;
                popupMenuHandle.gameObject.SetActive(true);
            }

            gameObject.SetActive(true);
        }
コード例 #9
0
ファイル: MentorshipPersonWnd.cs プロジェクト: zwong91/Titan
        public void SetData(int mentorshipID, int nPDBID, string szName, int nSeverPDBID, int nOnline, int nRelationType, bool bSelfPrentice)
        {
            m_MentorshipID  = mentorshipID;
            m_DesPDBID      = nPDBID;
            m_PrenticeName  = szName;
            m_bSelfPrentice = bSelfPrentice;

            headIcon.enabled = true;
            headIcon.sprite  = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_PlayerHead, WndID.WND_ID_SOCIALCONTACT, 1, 1);

            if (popupMenuHandle == null)
            {
                popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
            }

            UPopupAction popupAction = new UPopupAction();

            popupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(m_DesPDBID));

            if (nOnline == 0)
            {
                string szLeaveLineDesc = ULocalizationService.Instance.Get("UIView", "MentorshipPerson", "LeaveLineNameDesc");
                szLeaveLineDesc = szLeaveLineDesc.Replace("{1}", szName);
                name.text       = szLeaveLineDesc;
            }
            else
            {
                UEffectManager.Instance.DestroyEffect(UEffectType.UET_EffectMaterial, ref headIconMatParam);
                name.text = szName;
                popupAction.Add(UPopupItemDataPrivateChat.GetDescString(), new UPopupItemDataPrivateChat(m_PrenticeName));

                if (m_bSelfPrentice && nRelationType != (int)EMMentorshipType.emMentorshipType_Formal && !LogicDataCenter.mentorshipDataManager.IsFormalPrenticeFull())
                {
                    popupAction.Add(UPopupItemDataPromotePrentice.GetDescString(), new UPopupItemDataPromotePrentice(m_MentorshipID, m_DesPDBID));
                }
            }

            if (m_bSelfPrentice && (nSeverPDBID == 0 || nPDBID == nSeverPDBID))
            {
                popupAction.Add(UPopupItemDataDismissMentorship.GetDescString(), new UPopupItemDataDismissMentorship(m_MentorshipID));
            }

            popupMenuHandle.HandlePopupAction = popupAction;

            gameObject.SetActive(true);
        }
コード例 #10
0
        public void SetData(cmd_entity_king_of_hero_order_info info)
        {
            index.text = info.nOrderID.ToString();

            playerName.text = info.szName;

            sexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_CHART, (int)info.bySex + 1);
            sexIcon.gameObject.SetActive(true);

            winRate.text = Math.Round((float)info.nWinMatch / (float)info.nTotalMatch * 100, 1).ToString() + "%";

            rankIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankImage, WndID.WND_ID_CHART, 2, info.nRankIconID);
            rankIcon.gameObject.SetActive(true);
            rank.text       = info.szGradeName;
            detailData.text = info.nWinMatch + "/" + info.nTotalMatch;

            if (popupMenuHandle == null)
            {
                popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
            }

            UPopupAction PopupAction = new UPopupAction();

            PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail((int)info.nPDBID));

            popupMenuHandle.HandlePopupAction = PopupAction;

            bool bTop3 = false;

            if (info.nOrderID == 1 || info.nOrderID == 2 || info.nOrderID == 3)
            {
                bTop3 = true;
                indexIcon.gameObject.SetActive(true);
                indexIcon.sprite = top3IndexIcons[info.nOrderID - 1];
                index.gameObject.SetActive(false);
            }

            Color txtColor = bTop3 ? top3TextColor[info.nOrderID - 1] : Color.white;

            index.color      = txtColor;
            playerName.color = txtColor;
            winRate.color    = txtColor;
            rank.color       = txtColor;
            detailData.color = txtColor;
        }
コード例 #11
0
ファイル: LegendCupRegistWnd.cs プロジェクト: zwong91/Titan
        public void SetData(cmd_legendcup_recv_regist_memberlistnode memeberNode)
        {
            KinMemberName.text  = memeberNode.szActorName;
            KinMemberLevel.text = memeberNode.nActorLevel.ToString();

            if (memeberNode.nRankIconId != 0)
            {
                KinMemberRank.gameObject.SetActive(true);
                KinMemberRank.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankImage, WndID.WND_ID_LEGENDCUP_REGIST, 1, memeberNode.nRankIconId);
            }
            else
            {
                KinMemberRank.gameObject.SetActive(false);
            }

            if (memeberNode.nActorSex < (int)PERSON_SEX.SEX_MAX && memeberNode.nActorSex >= (int)PERSON_SEX.SEX_MALE)
            {
                KinMemberSex.gameObject.SetActive(true);
                KinMemberSex.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_LEGENDCUP_REGIST, memeberNode.nActorSex + 1);
            }
            else
            {
                KinMemberSex.gameObject.SetActive(false);
            }

            // 添加右键弹窗
            this.gameObject.RemoveComponent <UPopupMenuHandle>();
            UPopupMenuHandle popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();

            if (popupMenuHandle != null)
            {
                UPopupAction popupAction = new UPopupAction();
                popupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail((int)memeberNode.nPDBID));
                popupAction.Add(UPopupItemDataAddFriend.GetDescString(), new UPopupItemDataAddFriend(memeberNode.uDBID, memeberNode.szActorName));
                popupAction.Add(UPopupItemDataAddBlackList.GetDescString(), new UPopupItemDataAddBlackList(memeberNode.uDBID, memeberNode.szActorName));
                popupAction.Add(UPopupItemDataCopyName.GetDescString(), new UPopupItemDataCopyName(memeberNode.szActorName));
                popupAction.Add(UPopupItemDataPrivateChat.GetDescString(), new UPopupItemDataPrivateChat(memeberNode.szActorName));

                popupMenuHandle.HandlePopupAction = popupAction;
            }

            this.gameObject.SetActive(true);
        }
コード例 #12
0
ファイル: LegendCupKinInfoWnd.cs プロジェクト: zwong91/Titan
        public void SetKinMemberData()
        {
            ListKinMember.DataSource.Clear();
            ListKinMember.OnSelect.RemoveListener(OnSelectKinMember);
            ListKinMember.onRightClick.RemoveListener(OnSelectKinMember);

            cmd_kin_basedata          cmdHead  = LogicDataCenter.kinDataManager.LegendKinBaseData;
            List <cmd_kin_membernode> listData = LogicDataCenter.kinDataManager.LegendKinMemberList;

            UIWidgets.ObservableList <UListItemKinMember> dataSource = new UIWidgets.ObservableList <UListItemKinMember>();
            ListKinMember.DataSource.Clear();
            for (int i = 0; i < cmdHead.nMemberCount; ++i)
            {
                GameLogic.cmd_kin_membernode cmdNodeData = listData[i];
                UListItemKinMember           item        = new UListItemKinMember();
                Toggle tOffLineTog = OffLineTog.GetComponent <Toggle>();
                if (!tOffLineTog.isOn && cmdNodeData.bIsOnline == 0)
                {
                    // 隐藏不在线玩家
                    continue;
                }
                item.IdentityID  = cmdNodeData.nIdentity;
                item.PlayerID    = cmdNodeData.dwPDBID;
                item.GradIcon   += cmdNodeData.szGradeName;
                item.PersonIcon  = cmdNodeData.nFaceID;
                item.PersonName += cmdNodeData.szName;
                item.Power      += cmdNodeData.dwBattleVal;
                item.PowerRank  += cmdNodeData.dwBVOrder;
                item.GameState   = cmdNodeData.byGameState;
                item.Level      += cmdNodeData.nLevel;
                item.isOnline    = cmdNodeData.bIsOnline;
                item.nSex        = cmdNodeData.nSex;
                item.nLastOrder  = cmdNodeData.dwLastOrder;
                item.nBVOrder    = cmdNodeData.dwBVOrder;
                PopupAction      = new UPopupAction();
                if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) != item.PlayerID)
                {
                    PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(item.PlayerID));
                    PopupAction.Add(UPopupItemDataTeamInvite.GetDescString(), new UPopupItemDataTeamInvite(item.PlayerID));
                    PopupAction.Add(UPopupItemDataTeamRequest.GetDescString(), new UPopupItemDataTeamRequest(item.PlayerID));
                }
                item.PopupAction = PopupAction;
                dataSource.Add(item);
            }

            // 排序
            IEnumerable <UListItemKinMember> ListQuery = from item in dataSource
                                                         orderby item.isOnline descending, item.IdentityID descending, item.Power descending
            select item;

            UIWidgets.ObservableList <UListItemKinMember> tDataSource = new UIWidgets.ObservableList <UListItemKinMember>();
            foreach (UListItemKinMember Item in ListQuery)
            {
                tDataSource.Add(Item);
            }

            ListKinMember.DataSource = tDataSource;

            ListKinMember.OnSelect.AddListener(OnSelectKinMember);
            ListKinMember.onRightClick.AddListener(OnSelectKinMember);

            // 设置战队基本数据
            KinName.text         = cmdHead.szKinName;
            KinShaikhName.text   = cmdHead.szShaikhName;
            KinLevel.text        = cmdHead.nKinLevel.ToString();
            TotalMemberInfo.text = cmdHead.nOnlineCount + " / " + cmdHead.nMemberCount + "( " + ULocalizationService.Instance.Get("UIView", "KinMember", "MaxCountDes") + cmdHead.nKinMaxMember + ")";
            TotalFight.text      = cmdHead.nTotalFight.ToString();
            TotalOrder.text      = cmdHead.nFightOrder.ToString();

            KinLabel.text    = cmdHead.szKinLabel;
            MatchResult.text = cmdHead.nMatchWinNum + " / " + cmdHead.nMatchTotalNum;
            GoldAward.SetData(cmdHead.nGoldNum);
            SilverAward.SetData(cmdHead.nSilverNum);

            KinNoticeDes.text = cmdHead.szNotice;
        }
コード例 #13
0
ファイル: UListComponentClan.cs プロジェクト: zwong91/Titan
        public virtual void SetData(UListItemClanMember item)
        {
            if (DefalutBGSprite == null)
            {
                DefalutBGSprite = ComponentBG.sprite;
            }

            if (item.data.nSex < (int)PERSON_SEX.SEX_MAX && item.data.nSex >= (int)PERSON_SEX.SEX_MALE)
            {
                SexIcon.enabled = true;
                // 这里使用战队那边的,重复资源没必要再弄一份
                SexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_SOCIALCONTACT, item.data.nSex + 1);
            }
            else
            {
                SexIcon.enabled = false;
            }
            actorName.text = item.data.szName;
            if ((item.data.nIdentity == (int)EMClanIdentity.EMCLANIDENTITY_SHAIKH) &&
                (LogicDataCenter.clanDataManager.ClanBaseData.nShaikhState == (int)EMClanShaikhState.ClanShaikhState_Outgoing))
            {
                actorName.text += "(卸任)";
            }

            job.text          = LogicDataCenter.clanDataManager.GetClanIdentityName(item.data.nIdentity);
            level.text        = item.data.nLevel.ToString();
            gaveThisWeek.text = item.data.nDonateThisWeek.ToString() + "/" + item.data.nDonateTotal;
            power.text        = item.data.dwBattleVal.ToString();
            rank.text         = item.data.dwBVOrder.ToString();
            if (Convert.ToInt32(item.data.dwBVOrder) <= (int)EMClanOrderMax.EMCLANORDERMAX)
            {
                rank.enabled    = false;
                rankImg.enabled = true;
                // 这里使用战队那边的,重复资源没必要再弄一份
                rankImg.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinBattleOrder, WndID.WND_ID_SOCIALCONTACT, item.data.dwBVOrder);
            }
            else
            {
                rank.enabled    = true;
                rankImg.enabled = false;
            }
            int nChangeOrder = item.data.dwLastOrder - item.data.dwBVOrder;

            if (item.data.dwLastOrder == 0)
            {
                nChangeOrder = 0;
            }
            sortChange.text = nChangeOrder.ToString();
            if (nChangeOrder >= 0)
            {
                changeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_ClanRankChange, WndID.WND_ID_SOCIALCONTACT, 1);
                Color clr;
                ColorUtility.TryParseHtmlString("#fb8507", out clr);
                sortChange.color = clr;
            }
            else
            {
                changeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_ClanRankChange, WndID.WND_ID_SOCIALCONTACT, 2);
                Color clr;
                ColorUtility.TryParseHtmlString("#71bf81", out clr);
                sortChange.color = clr;
            }
            grade.text   = item.data.szGrade;
            kinName.text = item.data.szKinName;

            int    nGameState    = item.data.nIsOnline == 0 ? (int)ACTOR_GAME_STATE.GAME_STATE_OFFLINE : item.data.nGameStatus;
            string strStateColor = UDefines.GetGameStateColor(nGameState);
            string strStateDesc  = UDefines.GetGameStateDesc(nGameState);

            status.text = String.Format("<color=#{0}>{1}</color>", strStateColor, ULocalizationService.Instance.Get("UIView", "Common", strStateDesc));

            if (item.data.nIsOnline > 0)
            {
                Color clr;
                ColorUtility.TryParseHtmlString("#FFFFFF", out clr);
                actorName.color    = clr;
                job.color          = clr;
                level.color        = clr;
                gaveThisWeek.color = clr;
                power.color        = clr;
                rank.color         = clr;
                grade.color        = clr;
                kinName.color      = clr;
            }
            else
            {
                Color clr;
                ColorUtility.TryParseHtmlString("#adadad", out clr);
                status.color       = clr;
                actorName.color    = clr;
                job.color          = clr;
                level.color        = clr;
                gaveThisWeek.color = clr;
                power.color        = clr;
                rank.color         = clr;
                grade.color        = clr;
                kinName.color      = clr;
            }

            m_nMemberID = item.data.nPDBID;

            if (popupMenuHandle == null)
            {
                popupMenuHandle = gameObject.AddComponent <UPopupMenuHandle>();
            }

            int nHeroID    = 0;
            int nHeroKinID = 0;

            if (EntityFactory.MainHeroView != null)
            {
                nHeroID    = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);
                nHeroKinID = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_KIN);

                m_bSelf = item.data.nPDBID == nHeroID ? true : false;
                // 设置显示图片
                setComponentBG(0);
            }

            if (m_nMemberID != nHeroID)
            {
                UPopupAction popupAction = new UPopupAction();
                popupAction.Add(UPopupItemDataTeamInvite.GetDescString(), new UPopupItemDataTeamInvite(m_nMemberID));
                popupAction.Add(UPopupItemDataTeamRequest.GetDescString(), new UPopupItemDataTeamRequest(m_nMemberID));
                popupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(m_nMemberID));
                popupAction.Add(UPopupItemDataAddFriend.GetDescString(), new UPopupItemDataAddFriend(0, actorName.text));
                popupAction.Add(UPopupItemDataCopyName.GetDescString(), new UPopupItemDataCopyName(item.data.szName));
                if (item.data.nIsOnline > 0 && GameLogicAPI.isMainMap((int)item.data.dwSceneID))
                {
                    popupAction.Add(UPopupItemDataTransmitTo.GetDescString(), new UPopupItemDataTransmitTo((int)item.data.dwWorldID, (int)item.data.serverID, (int)item.data.dwSceneID));
                }

                if (item.data.nIdentity == (int)EMClanIdentity.EMCLANIDENTITY_ELDER)
                {
                    popupAction.Add(ULocalizationService.Instance.Get("UIView", "PopupMenu", "ClanSetLeader"), new UListComponentItemDataPopup(OnSetLeader));
                }

                if (item.data.nKinID != nHeroKinID)
                {
                    popupAction.Add(ULocalizationService.Instance.Get("UIView", "PopupMenu", "ClanKick"), new UListComponentItemDataPopup(OnKick));
                }

                popupMenuHandle.HandlePopupAction = popupAction;
            }
        }
コード例 #14
0
        public virtual void SetData(UListItemTaskReply reply)
        {
            if (reply == null)
            {
                return;
            }

            // 楼层
            ReplyIndex.text = String.Format("{0}楼", reply.nIndex);

            // 文字
            ReplyName.text    = reply.node.szReplyName;
            ReplyContent.text = reply.node.szReplyContent;

            // 性别
            if (reply.node.byReplySex < (byte)PERSON_SEX.SEX_MAX && reply.node.byReplySex >= (byte)PERSON_SEX.SEX_MALE)
            {
                ReplySexIcon.gameObject.SetActive(true);
                ReplySexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_TASK_UNFOLD, reply.node.byReplySex + 1);
                HeadIcon.gameObject.SetActive(true);
                HeadIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_PlayerHead, WndID.WND_ID_TASK_UNFOLD, 1, reply.node.byReplySex + 1);
            }
            else
            {
                ReplySexIcon.gameObject.SetActive(false);
                HeadIcon.gameObject.SetActive(false);
            }

            // 时间
            DateTime replyTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Unspecified).AddSeconds(reply.node.nReplyTime);

            replyTime = replyTime.ToLocalTime();
            int nGapTime = reply.nServerTime - reply.node.nReplyTime;

            if (nGapTime < 60)//1分钟
            {
                ReplyTime.text = String.Format("{0}秒前", nGapTime);
            }
            else if (nGapTime < 3600)//1小时
            {
                ReplyTime.text = String.Format("{0}分钟前", nGapTime / 60);
            }
            else if (nGapTime < 24 * 3600)//1天
            {
                ReplyTime.text = String.Format("{0}小时前", nGapTime / 3600);
            }
            else if (nGapTime < 2 * 24 * 3600)//2天
            {
                ReplyTime.text = String.Format("昨天 {0:D2}:{1:D2}", replyTime.Hour, replyTime.Minute);
            }
            else if (nGapTime < 3 * 24 * 3600)//3天
            {
                ReplyTime.text = String.Format("前天 {0:D2}:{1:D2}", replyTime.Hour, replyTime.Minute);
            }
            else
            {
                ReplyTime.text = String.Format("{0}-{1}-{2} {3:D2}:{4:D2}", replyTime.Year, replyTime.Month, replyTime.Day, replyTime.Hour, replyTime.Minute);
            }
            // 右键弹窗
            int nSelfID   = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);
            int nTargetID = reply.node.nReplyPDBID;

            if (nTargetID > 0 && nTargetID != nSelfID)
            {
                UPopupAction PopupAction = new UPopupAction();
                PopupAction.Add(UPopupItemDataAddFriend.GetDescString(), new UPopupItemDataAddFriend(reply.node.nReplyUserID, reply.node.szReplyName));
                PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(nTargetID));
                PopupAction.Add(UPopupItemDataTeamInvite.GetDescString(), new UPopupItemDataTeamInvite(nTargetID));
                PopupAction.Add(UPopupItemDataTeamRequest.GetDescString(), new UPopupItemDataTeamRequest(nTargetID));
                PopupAction.Add(UPopupItemDataBuddyChat.GetDescString(), new UPopupItemDataBuddyChat(nTargetID));
                PopupAction.Add(UPopupItemDataPrivateChat.GetDescString(), new UPopupItemDataPrivateChat(reply.node.szReplyName));

                ReplyMenuHandle.HandlePopupAction = PopupAction;
            }
        }
コード例 #15
0
        // 更新展开界面
        public void UpdateUnfoldWndView()
        {
            ClearView();

            // 解析数据(首胜奖励)
            bool bFirstWinType  = m_unfoldTask.nTaskType == (int)ENTASK_TYPE.ENTASK_TYPE_FIRSTWIN;
            int  nFirstWinState = 0;

            if (bFirstWinType && !String.IsNullOrEmpty(m_unfoldTask.szHit) && m_unfoldTask.szHit.Length > 1)
            {
                string strFirstWinState = m_unfoldTask.szHit.Substring(1, 1);
                nFirstWinState = Int32.Parse(strFirstWinState);
            }
            if (bFirstWinType)
            {
                m_unfoldTask.szDescription = ULocalizationService.Instance.Get("UIView", "Task", "FirstWinNormalDesc");
                if (nFirstWinState == 1)
                {
                    m_unfoldTask.szDescription = ULocalizationService.Instance.Get("UIView", "Task", "FirstWinHalfDesc");
                }
            }

            // 设置显示
            if (m_unfoldTask.llContactID <= 0)
            {
                InputFieldGo.SetActive(false);
                TaskReplyGo.SetActive(false);
                this.gameObject.GetComponent <RectTransform>().sizeDelta = new Vector2(774.0f, 240.0f);
            }
            else if (m_unfoldTask.listReply.Count <= 0)
            {
                InputFieldGo.SetActive(true);
                TaskReplyGo.SetActive(false);
                this.gameObject.GetComponent <RectTransform>().sizeDelta = new Vector2(774.0f, 370.0f);
            }
            else
            {
                InputFieldGo.SetActive(true);
                TaskReplyGo.SetActive(true);
                this.gameObject.GetComponent <RectTransform>().sizeDelta = new Vector2(774.0f, 586.0f);
            }
            WarRecordRT.gameObject.SetActive(m_unfoldTask.llTagID > 0);
            FinishRT.gameObject.SetActive(m_unfoldTask.nTaskState == (int)Task_State_Type.TaskStateType_Finish);
            GotoRT.gameObject.SetActive(m_unfoldTask.nClientLink > 0 && m_unfoldTask.nTaskState == (int)Task_State_Type.TaskStateType_Accept);

            // 设置任务
            if (String.IsNullOrEmpty(m_unfoldTask.szName))
            {
                TaskName.text = String.Format(ULocalizationService.Instance.Get("UIView", "Task", "UnfoldTitle"), m_unfoldTask.strPublishName);
            }
            else
            {
                TaskName.text = m_unfoldTask.szName;
            }

            TaskGo.SetActive(m_unfoldTask.nTaskID > 0);
            string strPoccess = "";

            if (!String.IsNullOrEmpty(m_unfoldTask.szHit))
            {
                strPoccess = m_unfoldTask.szHit;
            }
            else if (m_unfoldTask.nTaskState == (int)Task_State_Type.TaskStateType_Finish)
            {
                strPoccess = "(1/1)";
            }
            else
            {
                strPoccess = "(0/1)";
            }
            string strDesc = String.Format("{0},{1}{2}", m_unfoldTask.szDescription, ULocalizationService.Instance.Get("UIView", "Task", "NowPoccess"), strPoccess);

            UBB.toHtml(ref strDesc);
            Description.text = strDesc;

            if (TaskStarLevel.Length == (int)Task_Level.Level_3)
            {
                int nTaskLevel = TaskConfig.Instance.GetTaskLevel(m_unfoldTask.nTaskID, m_unfoldTask.nTaskType, m_unfoldTask.nTaskSubType, m_unfoldTask.nTaskSpecificType);;
                TaskStarLevel[0].gameObject.SetActive(nTaskLevel >= (int)Task_Level.Level_2);
                TaskStarLevel[1].gameObject.SetActive(nTaskLevel >= (int)Task_Level.Level_2);
                TaskStarLevel[2].gameObject.SetActive(nTaskLevel >= (int)Task_Level.Level_3);
            }

            // 设置首胜,特殊处理
            if (m_unfoldTask.nTaskState == (int)Task_State_Type.TaskStateType_End)
            {
                Description.text = m_unfoldTask.szDescription;

                int nRemianTime = LogicDataCenter.taskDataManager.FirstWinRemainTime;
                int nHour       = nRemianTime / 3600;
                int nMin        = nRemianTime % 3600 / 60;
                FirstWinReflushTime.text = String.Format("{0}{1:D2}:{2:D2}", ULocalizationService.Instance.Get("UIView", "Task", "FirstWinRemainDesc"), nHour, nMin);
                FirstWinReflushTime.gameObject.SetActive(true);
                m_fFirstWinCoolTime = Time.unscaledTime;
            }
            else
            {
                FirstWinReflushTime.gameObject.SetActive(false);
            }

            // 设置发布者
            PublisherGo.SetActive(m_unfoldTask.llContactID > 0);
            PublisherHead.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_PlayerHead, WndID.WND_ID_TASK_UNFOLD, 1, 1);
            PublisherName.text   = m_unfoldTask.strPublishName;
            EmotionWords.text    = m_unfoldTask.strEmotionWords;
            if (m_unfoldTask.nPublishSex < (int)PERSON_SEX.SEX_MAX && m_unfoldTask.nPublishSex >= (int)PERSON_SEX.SEX_MALE)
            {
                PublisherSex.gameObject.SetActive(true);
                PublisherSex.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_TASK_UNFOLD, m_unfoldTask.nPublishSex + 1);
                PublisherHead.gameObject.SetActive(true);
                PublisherHead.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_PlayerHead, WndID.WND_ID_TASK_UNFOLD, 1, m_unfoldTask.nPublishSex + 1);
            }
            else
            {
                PublisherSex.gameObject.SetActive(false);
                PublisherHead.gameObject.SetActive(false);
            }
            int nSelfID   = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);
            int nTargetID = m_unfoldTask.nPublishPDBID;

            // 右键弹窗
            if (nTargetID > 0 && nTargetID != nSelfID)
            {
                UPopupAction PopupAction = new UPopupAction();
                PopupAction.Add(UPopupItemDataAddFriend.GetDescString(), new UPopupItemDataAddFriend(m_unfoldTask.nPublishUserID, m_unfoldTask.strPublishName));
                PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail(nTargetID));
                PopupAction.Add(UPopupItemDataTeamInvite.GetDescString(), new UPopupItemDataTeamInvite(nTargetID));
                PopupAction.Add(UPopupItemDataTeamRequest.GetDescString(), new UPopupItemDataTeamRequest(nTargetID));
                PopupAction.Add(UPopupItemDataBuddyChat.GetDescString(), new UPopupItemDataBuddyChat(nTargetID));
                PopupAction.Add(UPopupItemDataPrivateChat.GetDescString(), new UPopupItemDataPrivateChat(m_unfoldTask.strPublishName));

                PublishMenuHandle.HandlePopupAction = PopupAction;
            }

            // 设置回复
            int nReplyCount = m_unfoldTask.listReply.Count;

            TaskReplyList.DataSource.Clear();
            ObservableList <UListItemTaskReply> dataSource = new ObservableList <UListItemTaskReply>();

            foreach (var item in m_unfoldTask.listReply)
            {
                UListItemTaskReply node = new UListItemTaskReply();
                node.nIndex      = nReplyCount--;
                node.nServerTime = m_unfoldTask.nServerTime;
                node.node        = item;
                dataSource.Add(node);
            }
            TaskReplyList.DataSource = dataSource;

            // 设置奖励
            for (int i = 0; i < TASK_PRIZE_ITEM_COUNT; i++)
            {
                if (m_unfoldTask.arrayPrize != null && i < m_unfoldTask.arrayPrize.Length)
                {
                    // 第二个首胜奖励
                    bool bShowClan = m_unfoldTask.nTaskType == (int)ENTASK_TYPE.ENTASK_TYPE_FIRSTWIN && i >= 1;
                    // 第二个首胜奖励,且完成1态
                    bool bShowNoHave = bShowClan && m_unfoldTask.nTaskState == (int)Task_State_Type.TaskStateType_Finish && nFirstWinState == 1;

                    m_arrTaskPrizeItem[i].SetData(m_unfoldTask.arrayPrize[i].nPrizeID, m_unfoldTask.arrayPrize[i].nCount, bFirstWinType, bShowClan, bShowNoHave);
                }
                else
                {
                    m_arrTaskPrizeItem[i].Clear();
                }
            }
            PrizePopupGo.SetActive(false);
        }
コード例 #16
0
        public void SetData(cmd_Entity_HighLadder_Rank_Info info)
        {
            index.text = info.nOrderID.ToString();

            playerName.text = info.szPlayerName;
            rankIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankImage, WndID.WND_ID_CHART, 2, info.nRankIconID);
            rankIcon.gameObject.SetActive(true);
            rankDesc.text = info.szGradeName;

            sexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_CHART, (int)info.bySex + 1);
            sexIcon.gameObject.SetActive(true);

            int nRankStar    = GameLogicAPI.getActorRankStar((int)Match_ManagerDef.EMMatchType.MatchType_Rank, info.nRankScore);
            int nMaxRankStar = GameLogicAPI.getActorCurRankMaxStar((int)Match_ManagerDef.EMMatchType.MatchType_Rank, info.nRankScore);

            for (int i = 0; i < StarImgFrame.childCount - 1; ++i)
            {
                if (nRankStar > 0)
                {
                    StarImgFrame.GetChild(i).GetComponent <Image>().sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankStarImage, WndID.WND_ID_CHART, 2);
                    StarImgFrame.GetChild(i).gameObject.SetActive(true);
                    nRankStar--;
                    nMaxRankStar--;
                }
                //else if (nMaxRankStar > 0)
                //{
                //    StarImgFrame.GetChild(index).GetComponent<Image>().sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_RankStarImage, WndID.WND_ID_CHART, 1);
                //    StarImgFrame.GetChild(index).gameObject.SetActive(true);
                //    nMaxRankStar--;
                //}
                else
                {
                    StarImgFrame.GetChild(i).gameObject.SetActive(false);
                }
            }

            //StarScore.text = info.nRankScore.ToString();
            clanName.text = info.szClanName;

            if (popupMenuHandle == null)
            {
                popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
            }

            UPopupAction PopupAction = new UPopupAction();

            PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail((int)info.idActor));
            popupMenuHandle.HandlePopupAction = PopupAction;

            bool bTop3 = false;

            //如果是前3,加牛逼框框
            if (info.nOrderID == 1 || info.nOrderID == 2 || info.nOrderID == 3)
            {
                bTop3 = true;
                indexIcon.gameObject.SetActive(true);
                indexIcon.sprite = top3IndexIcons[info.nOrderID - 1];
                index.gameObject.SetActive(false);
            }

            if (!U3D_Render.EntityView.isNullOrEmpty(EntityFactory.MainHeroView))
            {
                if (EntityFactory.MainHeroView.Property)
                {
                    if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) == info.idActor)
                    {
                        bSelfItem        = true;
                        borderImg.sprite = borderList[1];
                    }
                }
            }

            Color txtColor = bTop3 ? top3TextColor[info.nOrderID - 1] : Color.white;

            index.color      = txtColor;
            playerName.color = txtColor;
            rankDesc.color   = txtColor;
            StarScore.color  = txtColor;
            clanName.color   = txtColor;
        }
コード例 #17
0
        public void SetData(cmd_entity_hero_order_info info)
        {
            index.text = info.nOrder.ToString();

            playerName.text = info.szName;
            heroName.text   = info.szHeroName;
            starIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_HeroStarIcon, "HeroStarIcon" + info.nStarIcon, WndID.WND_ID_CHART);
            starName.text   = info.szStarDesc;
            starLv.text     = info.nHeroStar.ToString();
            score.text      = info.nHeroScore.ToString();

            sexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_CHART, (int)info.bySex + 1);
            sexIcon.gameObject.SetActive(true);

            chanceOfWin.text = Math.Round((float)info.dwWinNum / (float)info.dwMatchNum * 100, 1).ToString() + "%";
            clanName.text    = info.szClanName.ToString();

            if (popupMenuHandle == null)
            {
                popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>();
            }

            UPopupAction PopupAction = new UPopupAction();

            PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail((int)info.dwPlayerID));

            popupMenuHandle.HandlePopupAction = PopupAction;

            bool bTop3 = false;

            if (info.nOrder == 1 || info.nOrder == 2 || info.nOrder == 3)
            {
                bTop3 = true;
                indexIcon.gameObject.SetActive(true);
                indexIcon.sprite = top3IndexIcons[info.nOrder - 1];
                index.gameObject.SetActive(false);
            }

            if (!U3D_Render.EntityView.isNullOrEmpty(EntityFactory.MainHeroView))
            {
                if (EntityFactory.MainHeroView.Property)
                {
                    if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) == info.dwPlayerID)
                    {
                        bSelfItem        = true;
                        borderImg.sprite = borderList[1];
                    }
                }
            }

            Color txtColor = bTop3 ? top3TextColor[info.nOrder - 1] : Color.white;

            index.color       = txtColor;
            playerName.color  = txtColor;
            heroName.color    = txtColor;
            starName.color    = txtColor;
            starLv.color      = txtColor;
            score.color       = txtColor;
            chanceOfWin.color = txtColor;
            clanName.color    = txtColor;
        }