void OnRewardFindGridUpdate(UIGridBase data, int index) { if (null != m_lstRewardFindData && index < m_lstRewardFindData.Count) { data.SetGridData(m_lstRewardFindData[index]); } }
void OnUpdateUIGrid(UIGridBase grid, int index) { if (grid is PetScrollItem) { PetScrollItem item = grid as PetScrollItem; RefreshPetScrollItem(item, index); } else if (grid is PetTujianItem) { PetTujianItem item = grid as PetTujianItem; if (item != null) { item.gameObject.SetActive(true); if (index < petDataManager.PetTuJianList.Count) { PetDataBase db = petDataManager.PetTuJianList[index]; if (db != null) { item.UpdateData(db); } } } } else if (grid is PetTujianTitleItem) { PetTujianTitleItem item = grid as PetTujianTitleItem; if (item != null) { item.gameObject.SetActive(true); string str = GetSortTitleByIndex(index); item.SetText(str); } } }
void OnGodCampDataUpdate(UIGridBase data, int index) { if (null != m_lstCampCombatGod && index < m_lstCampCombatGod.Count) { data.SetGridData(m_lstCampCombatGod[index]); } }
void OnWelfareBtnDataUpdate(UIGridBase data, int index) { if (data is UIWelfareTypeGrid) { UIWelfareTypeGrid grid = data as UIWelfareTypeGrid; grid.SetSevenDayGridData(index); if (activedType == null && index == 0) { OnToggleValueChange(grid.SevenDayIndex); grid.OnSevenDaySelect(true); activedType = grid; } if (!m_dicToggles.ContainsKey(index + 1)) { m_dicToggles.Add(index + 1, grid); } } if (data is UISevenDayRewardGrid) { UISevenDayRewardGrid grid = data as UISevenDayRewardGrid; if (m_lst_UIItemRewardDatas != null) { if (index < m_lst_UIItemRewardDatas.Count) { grid.SetGridData(m_lst_UIItemRewardDatas[index]); } } } }
void OnUpdataGridData(UIGridBase grid, int index) { if (grid is UIDeliverGrid) { UIDeliverGrid tab = grid as UIDeliverGrid; if (index < m_lstTransfers.Count) { tab.SetGridData(index); tab.SetData(m_lstTransfers[index]); } } if (grid is UITabGrid) { UITabGrid tab = grid as UITabGrid; if (index < m_lst_TabType.Count) { tab.SetGridData(index); if (m_dic_TabName.ContainsKey(m_lst_TabType[index])) { tab.SetName(m_dic_TabName[m_lst_TabType[index]]); } tab.SetHightLight(index == activedIndex); } } }
void OnActivityListUpdate(UIGridBase grid, int index) { if (grid is UIActiveToggleGrid) { UIActiveToggleGrid toggleGrid = grid as UIActiveToggleGrid; if (index < m_lst_Type.Count) { toggleGrid.SetGridData(m_lst_Type[index]); } } if (grid is UIActiveOtherGrid) { UIActiveOtherGrid otherGrid = grid as UIActiveOtherGrid; if (index < activityList.Count) { otherGrid.SetGridData(activityList[index]); } } if (grid is UIDailyGiftGrid) { UIDailyGiftGrid giftGrid = grid as UIDailyGiftGrid; if (index < activityList.Count) { giftGrid.SetGridData(activityList[index]); } } }
/// <summary> /// 二级页签刷新回调 /// </summary> /// <param name="grid"></param> /// <param name="id"></param> /// <param name="index"></param> private void OnUpdateSecondTabGrid(UIGridBase grid, object id, int index) { if (grid is UISecondTypeGrid) { UISecondTypeGrid sGrid = grid as UISecondTypeGrid; sGrid.SetRedPoint(false); uint cid = (uint)id; CategoryTypeData fctd = null; if (cid == 0) { fctd = new CategoryTypeData(0, "可合成"); } else { fctd = m_mgr.GetCategoryTypeDataByType(CategoryTypeData.CategoryType.First , cid); } CategoryTypeData sctd = m_mgr.GetCategoryTypeDataByType(CategoryTypeData.CategoryType.Second , fctd.GetDataByIndex(index)); if (null != sctd) { sGrid.SetData(sctd.m_uint_categoryId , sctd.m_str_categoryName , (m_uint_activeStype == sctd.m_uint_categoryId)); } } }
void OnGridUpdateData(UIGridBase data, int index) { if (m_rewardList != null && index < m_rewardList.Count) { UIArenaRewardGrid grid = data as UIArenaRewardGrid; if (grid == null) { return; } grid.SetGridData(m_rewardList[index].id); if (index < 3) { grid.SetRewardRankSpr(m_rewardList[index].rank_cap); } else { grid.SetRewardRankLbl(m_rewardList[index].rank_cap, m_rewardList[index].rank_floor); } grid.SetRewardOne(m_rewardList[index].ticket_reward); grid.SetRewardTwo(m_rewardList[index].gold_reward); grid.SetRewardThree(m_rewardList[index].score_reward); grid.SetRewardFour(m_rewardList[index].experience_reward); } }
private void OnHomeFriendGridDataUpdate(UIGridBase data, int index) { if (null != friendList && index < friendList.Count) { data.SetGridData(friendList[index]); } }
void OnTeamGridDataUpdate(UIGridBase data, int index) { if (TDManager.ConvenientTeamList != null && index < TDManager.ConvenientTeamList.Count) { UIExistedTeamGrid grid = data as UIExistedTeamGrid; if (grid != null) { grid.SetGridData(TDManager.ConvenientTeamList[index]); grid.SetName(grid.m_teamInfo.teamname); grid.SetIcon(grid.m_teamInfo.byjob); grid.SetLv(grid.m_teamInfo.byLevel); TeamActivityDatabase db = GameTableManager.Instance.GetTableItem <TeamActivityDatabase>(TDManager.ConvenientTeamList[index].active_id); if (db != null) { grid.SetTargetName(db.indexName); } else { grid.SetTargetName("无"); } } } }
private void OnRankGridDataUpdate(UIGridBase data, int index) { if (data is UIRankGrid) { UIRankGrid rg = data as UIRankGrid; rg.SetRankIndex((uint)index); if (index < rankList.Count) { rg.SetGridData(rankList[index]); rg.SetSelect(false); } } else if (data is UICtrTypeGrid) { if (index < mlstFirstTabIds.Count) { UICtrTypeGrid grid = data as UICtrTypeGrid; grid.SetRedPointStatus(false); if (rankDic.ContainsKey((uint)(index + 1))) { List <RankTypeDataBase> d = rankDic[(uint)(index + 1)]; if (index < mlstFirstTabIds.Count && d.Count > 0) { grid.SetData(mlstFirstTabIds[index], d[0].mainName, d.Count); } } } } }
private void OnUpdateSecondGrid(UIGridBase gridBase, object id, int index) { UITeamActivityChildGrid grid = gridBase as UITeamActivityChildGrid; if (grid == null) { return; } List <uint> teamActivityIdList; if (m_dicActivity.TryGetValue((uint)id, out teamActivityIdList)) { if (index > teamActivityIdList.Count) { return; } grid.SetGridData(teamActivityIdList[index]); grid.SetSelect(m_selectActivityId == teamActivityIdList[index]); TeamActivityDatabase db = tableActivityList.Find((data) => { return(data.ID == teamActivityIdList[index]); }); grid.SetName(db != null ? db.indexName : ""); grid.SetTargetMark(false); } }
void OnMonthItemDataUpdate(UIGridBase data, int index) { if (null != m_lstWelFareData && index < m_lstWelFareData.Count) { data.SetGridData(m_lstWelFareData[index]); } }
void OnCollectWordGridUpdate(UIGridBase data, int index) { if (null != m_lstWelFareData && index < m_lstWelFareData.Count) { data.SetGridData(m_lstWelFareData[index]); } }
/// <summary> /// 更新二级页签数据 /// </summary> /// <param name="gridBase"></param> /// <param name="id"></param> /// <param name="index"></param> private void OnUpdateMissionSecondGrid(UIGridBase gridBase, object id, int index) { UISecondTypeGrid grid = gridBase as UISecondTypeGrid; if (grid == null) { return; } MissionEnum missionType = (MissionEnum)id; List <QuestTraceInfo> taskList = GetQuestListByType(missionType); if (taskList == null) { return; } if (taskList.Count > index) { string name = QuestTraceInfo.GetTableTaskByID(taskList[index].taskId).strName; grid.SetData(taskList[index].taskId, name, false); grid.SetRedPoint(false); } }
void OnUpdateGridData(UIGridBase grid, int index) { if (grid is UIItemRewardGrid) { UIItemRewardGrid itemShow = grid as UIItemRewardGrid; if (itemShow != null) { if (index < list.Count) { UIItemRewardData data = list[index]; uint itemID = data.itemID; uint num = data.num; itemShow.SetGridData(itemID, num, false); BoxCollider[] coll = itemShow.transform.GetComponentsInChildren <BoxCollider>(); if (coll != null) { foreach (var i in coll) { i.enabled = false; } } } } } }
private void OnGridDataUpdate(UIGridBase data, int index) { if (data is UIDailyTestGrid) { if (m_lstDailyTestInfo != null && index < m_lstDailyTestInfo.Count) { UIDailyTestGrid grid = data as UIDailyTestGrid; if (grid != null) { grid.SetGridData(m_lstDailyTestInfo[index].id); grid.SetTitleName(m_lstDailyTestInfo[index].name); string expDesc = string.Format("{0}倍经验", m_lstDailyTestInfo[index].expMultiple); grid.SetExpDesc(expDesc); string lvDesc = string.Format("怪物等级:{0}-{1}", m_lstDailyTestInfo[index].lvMin, m_lstDailyTestInfo[index].lvMax); grid.SetLvDesc(lvDesc); grid.SetMark(m_lstDailyTestInfo[index].isRecommend); grid.SetBg(m_lstDailyTestInfo[index].bgId); } } } }
void OnUpdateGridData(UIGridBase grid, int index) { if (grid is UIItemRewardGrid) { UIItemRewardGrid itemShow = grid as UIItemRewardGrid; if (itemShow != null) { if (_UIItemRewardDatas != null) { uint itemID = _UIItemRewardDatas.itemID; itemShow.SetGridData(itemID, 1, false, false, false); Active_Num.text = _UIItemRewardDatas.num.ToString(); bool isNone = _UIItemRewardDatas.blockVisible; bool isGot = _UIItemRewardDatas.hasGot; m_none.gameObject.SetActive(isNone); m_get.gameObject.SetActive(!isNone && !isGot); m_got.gameObject.SetActive(isGot); AddParticle(!isNone && !isGot); if (itemShow != null) { itemShow.HideBoxCollider(!isNone && !isGot); } } } } }
private void OnTotemGridDataUpdate(UIGridBase data, int index) { if (null != m_lstCityWarTotem && index < m_lstCityWarTotem.Count) { UICityWarTotemGrid grid = data as UICityWarTotemGrid; if (grid != null) { grid.SetGridData(m_lstCityWarTotem[index]); grid.SetIcon(m_lstCityWarTotem[index].iconName); grid.SetHp(m_lstCityWarTotem[index].hp, m_lstTotemMaxHp[index]); if (m_lstCityWarTotem[index].clanId != 0) { grid.SetClanName(m_lstCityWarTotem[index].clanName); //if (m_clanManger.CityWarClanIdList.Contains(m_lstCityWarTotem[index].clanId)) //{ // int clanIndex = m_clanManger.CityWarClanIdList.IndexOf(m_lstCityWarTotem[index].clanId); // string clanName = clanIndex < m_clanManger.CityWarClanNameList.Count ? m_clanManger.CityWarClanNameList[clanIndex] : ""; // grid.SetClanName(clanName); //} } else { grid.SetClanName("中立"); } } } }
void OnTreasureBossGridUpdate(UIGridBase grid, int index) { if (grid is UITreasureBossGrid) { if (m_lst_TreasureDatas != null) { if (index < m_lst_TreasureDatas.Count) { uint id = m_lst_TreasureDatas[index]; if (id != 0) { UITreasureBossGrid listGrid = grid as UITreasureBossGrid; listGrid.SetGridData(id); listGrid.SetHightLight(false); if (index == 0) { SelectBossGrid(listGrid); } } } } } if (grid is UITabGrid) { UITabGrid g = grid as UITabGrid; int tabID = index + 1; if (tabDic.ContainsKey((uint)tabID)) { g.SetName(tabDic[(uint)tabID]); g.TabID = tabID; } } }
void OnRideSkillGridDataUpdate(UIGridBase data, int index) { if (m_lstSkills != null && index < m_lstSkills.Count) { data.SetGridData(m_lstSkills[index]); } }
void OnRidtGridDataUpdate(UIGridBase data, int index) { if (m_lstRideData != null && index < m_lstRideData.Count) { data.SetGridData(m_lstRideData[index]); } }
/// <summary> /// 跟新一级页签数据 /// </summary> /// <param name="gridBase"></param> /// <param name="index"></param> private void OnUpdateTitileCtrTypeGrid(UIGridBase gridBase, int index) { if (m_titleDic != null && m_titleDic.Keys.Count > index) { UICtrTypeGrid grid = gridBase as UICtrTypeGrid; if (grid == null) { return; } Dictionary <uint, List <uint> > .KeyCollection kc = m_titleDic.Keys; List <uint> keyIdList = kc.ToList <uint>(); uint keyId = keyIdList[index]; List <uint> secondIdList; if (m_titleDic.TryGetValue(keyId, out secondIdList)) { if (secondIdList.Count == 0) { return; } TitleDataBase tdb = m_lstTableTitle.Find((d) => { return(d.dwID == secondIdList[0]); }); //数据 grid.SetData(keyId, tdb != null ? tdb.secondTypeName : "", secondIdList.Count); //红点 bool haveNewTitle = HaveNewTilteInList(secondIdList); grid.SetRedPointStatus(haveNewTitle); } } }
/// <summary> /// 更新格子数据 /// </summary> /// <param name="grid"></param> /// <param name="index"></param> private void OnUIGridUpdate(UIGridBase grid, int index) { if (grid is UIClanGrid) { UIClanGrid clanGrid = grid as UIClanGrid; if (m_lst_clanTempInfos.Count > index) { clanGrid.SetGridData(m_lst_clanTempInfos[index]); clanGrid.SetHightLight((m_lst_clanTempInfos[index].Id == m_uint_selectId) ? true : false); clanGrid.SetTagEnable(m_mgr.IsApplyClan(m_lst_clanTempInfos[index].Id)); clanGrid.SetBgSprite(index); } } else if (grid is UIClanSupportGrid) { UIClanSupportGrid clanSpGrid = grid as UIClanSupportGrid; if (m_lst_clanTempInfos.Count > index) { clanSpGrid.SetGridData(m_lst_clanTempInfos[index]); clanSpGrid.SetBgSprite(index); clanSpGrid.SetHightLight((m_lst_clanTempInfos[index].Id == m_uint_selectId) ? true : false); clanSpGrid.SetTagEnable(m_mgr.IsJoinClan && null != m_mgr.ClanInfo && (m_mgr.ClanId == m_lst_clanTempInfos[index].Id) && !DataManager.Manager <ClanManger>().IsClanCreatorSelf); } } }
private void OnGridUpdate(UIGridBase gridBase, int index) { if (gridBase is UITabGrid) { UITabGrid tGrid = gridBase as UITabGrid; Category c = null; if (category.TryGetCategory(selectfTabID, out c)) { Category s = c.ChildCategoryData[index]; tGrid.SetGridData(s.Id); tGrid.SetName(s.Name, 3); tGrid.SetHightLight(s.Id == selectsTabID); } } else if (gridBase is UIExchangeGrid) { UIExchangeGrid eGrid = gridBase as UIExchangeGrid; Category f = null; Category s = null; if (category.TryGetCategory(selectfTabID, out f) && f.TryGetCategory(selectsTabID, out s)) { eGrid.SetGridData(s.Datas[index]); eGrid.SetHightLight(s.Datas[index] == selectExchangeId); } } }
void OnDemonCampDataUpdate(UIGridBase data, int index) { if (null != m_lstCampCombatDemon && index < m_lstCampCombatDemon.Count) { data.SetGridData(m_lstCampCombatDemon[index]); } }
void OnItemGridDataUpdate(UIGridBase data, int index) { if (m_lstUseItemData != null && index < m_lstUseItemData.Count) { data.SetGridData(m_lstUseItemData[index]); } }
void OnUpdateInviteList(UIGridBase data, int index) { if (null != infos && index < infos.Count) { data.SetGridData(infos[index]); } }
void OnWelfareInviteDataGrid(UIGridBase data, int index) { if (null != m_lstWelFareData && index < m_lstWelFareData.Count) { data.SetGridData(m_lstWelFareData[index]); } }
private void OnWelfareBtnDataUpdate(UIGridBase grid, int index) { if (grid is UIOpenServerGrid) { UIOpenServerGrid tabGrid = grid as UIOpenServerGrid; tabGrid.SetGridData(tableList[index].ID); } }