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; }
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; } }
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; }
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); }
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); }
public virtual void SetData(UListItemLadder item) { OrderID.text = item.OrderID.ToString(); PlayerName.text = item.PlayerName; RankGrade.text = item.RankGrade.ToString(); RankScore.text = item.RankScore.ToString(); RankGradeDes.text = item.RankGradeDes.ToString(); if (PopupMenuHandle == null) { PopupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>(); } PopupMenuHandle.HandlePopupAction = item.PopupAction; }
private void SetPopupMenu(GameObject Go, int nKinID) { // 添加右键弹窗 Go.RemoveComponent <UPopupMenuHandle>(); UPopupMenuHandle popupMenuHandle = Go.AddComponent <UPopupMenuHandle>(); if (popupMenuHandle != null) { UPopupAction popupAction = new UPopupAction(); popupAction.Add(UPopupItemDataKinView.GetDescString(), new UPopupItemDataKinView(nKinID)); popupAction.Add(UPopupItemDataCompetitionKinMemberView.GetDescString(), new UPopupItemDataCompetitionKinMemberView(nKinID)); popupMenuHandle.HandlePopupAction = popupAction; } }
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); }
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; }
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); }
public virtual void SetData(UListItemLegendCupRegist item) { if (item.nIndex <= 0) { BgIcon.gameObject.SetActive(true); ItemView.SetActive(false); BgIcon.raycastTarget = false; return; } BgIcon.gameObject.SetActive(true); BgIcon.raycastTarget = true; ItemView.SetActive(true); ItemIndex.text = item.nIndex.ToString(); KinName.text = item.data.szKinName; KinLevel.text = item.data.nKinLevel.ToString(); KinCupResult.text = item.data.nKinWinNum + "/" + item.data.nKinMaxNum; // 颜色设置 //bool bInThisKin = LogicDataCenter.legendCupDataManager.CheckIsSelfInKinRegistMember(item.data.nKinID); int nSlefKinID = LogicDataCenter.kinDataManager.KinBaseData.nKinID; bool bInThisKin = nSlefKinID == item.data.nKinID; Color clrState = bInThisKin ? UDefines.CommomColor(ECommonColor.ECC_Gold1) : UDefines.CommomColor(ECommonColor.ECC_White); ItemIndex.color = clrState; KinName.color = clrState; KinLevel.color = clrState; KinCupResult.color = clrState; // 添加右键弹窗 this.gameObject.RemoveComponent <UPopupMenuHandle>(); UPopupMenuHandle popupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>(); if (popupMenuHandle != null) { UPopupAction popupAction = new UPopupAction(); popupAction.Add(UPopupItemDataKinView.GetDescString(), new UPopupItemDataKinView(item.data.nKinID)); popupAction.Add(UPopupItemDataRegistKinMemberView.GetDescString(), new UPopupItemDataRegistKinMemberView(item.data.nLegendCupID, item.data.nKinID)); popupMenuHandle.HandlePopupAction = popupAction; } }
public void SetData(legendcup_kininfo kinInfo) { KinName.text = kinInfo.szKinName; KinName.color = UDefines.CommomColor(ECommonColor.ECC_White); if (LogicDataCenter.legendCupDataManager.CheckIsSelfInCompetitionMember(kinInfo.nKinID)) { KinName.color = UDefines.CommomColor(ECommonColor.ECC_Gold1); } // 添加右键弹窗 KinName.gameObject.RemoveComponent <UPopupMenuHandle>(); UPopupMenuHandle popupMenuHandle = KinName.gameObject.AddComponent <UPopupMenuHandle>(); if (popupMenuHandle != null) { UPopupAction popupAction = new UPopupAction(); popupAction.Add(UPopupItemDataKinView.GetDescString(), new UPopupItemDataKinView(kinInfo.nKinID)); popupAction.Add(UPopupItemDataCompetitionKinMemberView.GetDescString(), new UPopupItemDataCompetitionKinMemberView(kinInfo.nKinID)); popupMenuHandle.HandlePopupAction = popupAction; } }
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; } }
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; }
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; }
public virtual void SetData(UListItemKinMember item) { if (DefalutBGSprite == null) { DefalutBGSprite = ComponentBG.sprite; } if (item.nSex < (int)PERSON_SEX.SEX_MAX && item.nSex >= (int)PERSON_SEX.SEX_MALE) { SexIcon.enabled = true; SexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_SOCIALCONTACT, item.nSex + 1); } else { SexIcon.enabled = false; } switch ((TKinIdentity)item.IdentityID) { case TKinIdentity.emKinIdentity_Member: { Identity.text = ULocalizationService.Instance.Get("UIView", "KinMember", "MemberDes"); } break; case TKinIdentity.emKinIdentity_Elder: { Identity.text = ULocalizationService.Instance.Get("UIView", "KinMember", "ElderDes"); } break; case TKinIdentity.emKinIdentity_Shaikh: { Identity.text = ULocalizationService.Instance.Get("UIView", "KinMember", "ShaikhDes"); } break; default: break; } Level.text = ""; Level.text = item.Level; PersonName.text = ""; PersonName.text = item.PersonName; Power.text = ""; Power.text += item.Power; int nChangeOrder = item.nLastOrder - item.nBVOrder; if (item.nLastOrder == 0) { nChangeOrder = 0; } ChangeText.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); ChangeText.color = clr; } else { ChangeImage.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_ClanRankChange, WndID.WND_ID_SOCIALCONTACT, 2); Color clr; ColorUtility.TryParseHtmlString("#71bf81", out clr); ChangeText.color = clr; } if (Convert.ToInt32(item.PowerRank) <= (int)TKinOrderMAX.emKinOrderMAX) { PowerRankImg.enabled = true; PowerRankImg.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinBattleOrder, WndID.WND_ID_SOCIALCONTACT, Convert.ToInt32(item.PowerRank)); } else { PowerRankImg.enabled = false; } Order.text = item.PowerRank; GradIcon.text = item.GradIcon; int nGameState = item.isOnline == 0 ? (int)ACTOR_GAME_STATE.GAME_STATE_OFFLINE : item.GameState; string strStateColor = UDefines.GetGameStateColor(nGameState); string strStateDesc = UDefines.GetGameStateDesc(nGameState); State.text = String.Format("<color=#{0}>{1}</color>", strStateColor, ULocalizationService.Instance.Get("UIView", "Common", strStateDesc)); if (item.isOnline == 0) { // 设置离线颜色 Color clr; ColorUtility.TryParseHtmlString("#adadad", out clr); Level.color = clr; PersonName.color = clr; Power.color = clr; Order.color = clr; GradIcon.color = clr; State.color = clr; Identity.color = clr; } else { // 设置在线颜色 Color clr; ColorUtility.TryParseHtmlString("#ffffff", out clr); Level.color = clr; PersonName.color = clr; Power.color = clr; Order.color = clr; GradIcon.color = clr; Identity.color = clr; ColorUtility.TryParseHtmlString("#18ff00", out clr); State.color = clr; } if (PopupMenuHandle == null) { PopupMenuHandle = this.gameObject.AddComponent <UPopupMenuHandle>(); } PopupMenuHandle.HandlePopupAction = item.PopupAction; }