/// <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); } } }
/// <summary> /// 设置当前选中的氏族 /// </summary> /// <param name="clanId"></param> public void SetSelectClan(ClanDefine.LocalClanInfo selectInfo) { if (selectInfo.Id == m_uint_selectId || null == m_ctor_ClanApplyScrollView) { return; } //刷新数据 UIClanGrid grid = m_ctor_ClanApplyScrollView.GetGrid <UIClanGrid>(m_lst_clanTempInfos.IndexOf(ClanData)); if (null != grid) { grid.SetHightLight(false); } grid = m_ctor_ClanApplyScrollView.GetGrid <UIClanGrid>(m_lst_clanTempInfos.IndexOf(selectInfo)); if (null != grid) { grid.SetHightLight(true); } m_uint_selectId = selectInfo.Id; UpdateApply(); }