public void UpdateSize() { if (!m_init) { return; } UpdateColumnWidths(); m_head.UpdateHeadSize(); UpdateScrollRectSize(); m_scrollRect.RefillCells(); }
public void SetData(List <FriendCircleVo> data) { _data = data; //_data 需要按时间排序 _data.Sort(); _showData = _data.FindAll(item => { return((item.FriendCircleRuleInfo.friendCircleSceneInfo.NpcId == 0 && item.PublishState) || item.FriendCircleRuleInfo.friendCircleSceneInfo.NpcId != 0); }); _loopRect.ClearCells(); ShowList(); _loopRect.RefillCells(); }
public void OnShow() { this.Show(); temp = GameController.Instance.data.botNames; scrollView.totalCount = temp.Count; nameInput.text = UIManager.Ins.PlayerName; countryInput.text = UIManager.Ins.PlayerCountry; countryName = UIManager.Ins.PlayerCountry; index = temp.FindIndex(s => s.countryCode == UIManager.Ins.PlayerCountry); scrollView.ScrollToCell(index, 10000); scrollView.RefillCells(); // selectedIm.SetParent(scrollView); }
/// <summary> /// 生成玩家搜索列表UI /// </summary> private void GenerateSearchListUI(int playerCount) { isRecommendUI = false; lsRecommendList.ClearCells(); lsRecommendList.totalCount = playerCount; if (lsRecommendList.totalCount > 0) { _QCharacter.gameObject.SetActive(false); } else { ShowEmptyTip(FriendTabTags.TabRecommend); } lsRecommendList.RefillCells(); }
public void SetData(List <ResolveCardVo> data, PlayerPB filter = PlayerPB.None) { InitProps(); _tabSelectedFilter = filter; _list.RefillCells(); _selectAllToggle.isOn = false; _originalData = data; if (_tabSelectedFilter != PlayerPB.None) { _userCardList = data.FindAll(match => { return(match.Player == filter); }); } else { _userCardList = data; } _list.totalCount = _userCardList.Count; _list.RefreshCells(); if (_userCardList.Count == 0) { //FlowText.ShowMessage("待收集"); _tips.gameObject.Show(); } else { _tips.gameObject.Hide(); } }
public void SetData(List <CardPuzzleVo> data) { _puzzleList.RefillCells(); _originalData = data; if (_currentTab != PlayerPB.None) { _puzzleData = data.FindAll(match => { return(match.Player == _currentTab && match.Num > 0); }); _puzzleList.verticalNormalizedPosition = -0.5f; } else { //后端会把数量为0的东西也发给我! _puzzleData = data.FindAll(match => { return(match.Num > 0); }); } if (_puzzleData.Count == 0) { _tips.gameObject.Show(); } else { _tips.gameObject.Hide(); } _puzzleList.UpdateCallback = PuzzleListUpdateCallback; _puzzleList.totalCount = _puzzleData.Count; _puzzleList.RefreshCells(); }
public void SetMyCardData(List <UserCardVo> cards, PlayerPB filter = PlayerPB.None, bool needtorefillcells = true) { if (needtorefillcells) { _cardList.RefillCells(); } _originalData = cards; if (filter != PlayerPB.None) { _data = cards.FindAll(match => { return(match.CardVo.Player == filter); }); } else { _data = cards; } _tips.gameObject.SetActive(_curState == CardModule.CardViewState.MyCard && _data.Count == 0); //Debug.LogError(_data.Count); _cardList.totalCount = _data.Count; _cardList.RefreshCells(); _carddetailRedpoint.SetActive(GlobalData.CardModel.ShowCardDetailRedPoint); _cardpuzzleRedpoint.SetActive(GlobalData.CardModel.ShowCardPuzzleRedpoint); }
public void SetGemMallPage(List <UserBuyRmbMallVo> gemItemVos) { // Debug.LogError(gemItemVos.Count); _gemPageList.RefillCells(); _gemPageList.UpdateCallback = GemPageListCallBack; _gemPageList.totalCount = gemItemVos.Count; _gemPageList.RefreshCells(); _buggemcontentbg.anchoredPosition = Vector2.zero; var scroll = _gemPageList.transform.GetComponent <ScrollRect>(); if (gemItemVos.Count <= 12) { _buggemcontentbg.SetHeight(1712); scroll.enabled = false; _gemPageList.movementType = LoopScrollRect.MovementType.Clamped; } else if (gemItemVos.Count > 13 && gemItemVos.Count <= 16) { _buggemcontentbg.SetHeight(_bgHeight * ((float)Math.Ceiling(gemItemVos.Count * 0.25f))); _gemPageList.movementType = LoopScrollRect.MovementType.Clamped; scroll.enabled = true; scroll.movementType = ScrollRect.MovementType.Clamped; } else { _buggemcontentbg.SetHeight(_bgHeight * ((float)Math.Ceiling(gemItemVos.Count * 0.25f))); _gemPageList.movementType = LoopScrollRect.MovementType.Elastic; scroll.enabled = true; } }
//public Image game_name; //public void setGameName() { // //string name = "CHỌN GAME"; // int nameIndex = -1; // switch (gameControl.gameID) { // case GameID.PHOM: // // name = "PHỎM"; // nameIndex = 0; // break; // case GameID.TLMN: // // name = "TIẾN LÊN MN"; // nameIndex = 1; // break; // case GameID.XITO: // // name = "XÌ TỐ"; // nameIndex = 2; // break; // case GameID.MAUBINH: // // name = "MẬU BINH"; // nameIndex = 3; // break; // case GameID.BACAY: // // name = "BA CÂY"; // nameIndex = 4; // break; // case GameID.LIENG: // // name = "LIÊNG"; // nameIndex = 5; // break; // case GameID.XAM: // // name = "SÂM"; // nameIndex = 6; // break; // case GameID.XOCDIA: // // name = "XÓC ĐĨA"; // nameIndex = 7; // break; // case GameID.POKER: // // name = "POKER"; // nameIndex = 8; // break; // case GameID.TAIXIU: // //name = "TÀI XỈU"; // nameIndex = 9; // break; // case GameID.TLMNsolo: // // name = "TIẾN LÊN MN Solo"; // nameIndex = 10; // break; // case GameID.XENG: // // name = "XÈNG"; // nameIndex = 11; // break; // } // game_name.sprite = gameControl.gameNames[nameIndex]; //} public void createScollPane() { // List<TableItem> listTable = gameControl.listTable; gameControl.panelWaiting.onShow(); //if (parent.childCount > 0) { //loopVerticalScrollRect.RefillCells(); loopVerticalScrollRect.ClearCells(); loopVerticalScrollRect.RefillCells(); // } loopVerticalScrollRect.totalCount = gameControl.listTable.Count; //loopVerticalScrollRect.enabled = true; //for (int i = 0; i < listRoom.Count; i++) { // Destroy(listRoom[i]); //} //listRoom.Clear(); //for (int i = 0; i < listTable.Count; i++) { // GameObject obj = Instantiate(prefabsTable) as GameObject; // obj.transform.SetParent(parent); // obj.transform.localScale = Vector3.one; // obj.GetComponent<TableBehavior>().index = i; // obj.GetComponent<TableBehavior>().ScrollCellIndex(listTable[i]); // listRoom.Add(obj); //} gameControl.panelWaiting.onHide(); }
public void SetStarRoadItemData() { _achievementList.UpdateCallback = StarListUpdateCallBack; _achievementList.totalCount = _data.Count; _achievementList.RefreshCells(); _achievementList.RefillCells(); }
private void SetAccumulativeList(List <AccumulativeRechargeVO> accumulativeRechargeVos, int refillidx) { _loopVerticalScroll.totalCount = accumulativeRechargeVos.Count; _loopVerticalScroll.RefreshCells(); //这个RefillCells有毒!!! _loopVerticalScroll.RefillCells(refillidx); }
public void SetGemMallPage(List <UserBuyGameMallVo> gemMallVos) { // Debug.LogError(gemMallVos.Count); _gemPageList.UpdateCallback = GemPageListCallBack; _gemPageList.totalCount = gemMallVos.Count; _gemPageList.RefreshCells(); _gemPageList.RefillCells(); _gemcontentbg.anchoredPosition = Vector2.zero; _gemPageList.content.GetRectTransform().anchoredPosition = Vector2.zero; var scroll = _gemPageList.transform.GetComponent <ScrollRect>(); // if ( gemMallVos.Count<=9) // { // _gemcontentbg.SetHeight(_totalHigh); // scroll.enabled = false; //// _gemPageList.movementType = LoopScrollRect.MovementType.Clamped; // } // else if(gemMallVos.Count>=10&&gemMallVos.Count<=12) // { _gemcontentbg.SetHeight(_bgHeight * ((float)Math.Ceiling(gemMallVos.Count * _cellRate))); // _gemPageList.movementType = LoopScrollRect.MovementType.Clamped; scroll.enabled = true; scroll.movementType = ScrollRect.MovementType.Clamped; // } // else // { // _gemcontentbg.SetHeight(_bgHeight*((float)Math.Ceiling(gemMallVos.Count*_cellRate))); //// _gemPageList.movementType = LoopScrollRect.MovementType.Elastic; // scroll.enabled = true; // // } }
private void Awake() { m_LoopVerticalScrollRect.OnItemRemoveEvent += OnItemRemove; m_LoopVerticalScrollRect.OnItemCreateEvent += OnItemCreate; m_LoopVerticalScrollRect.RefillCells(m_DataCount); }
public void Rebuild() { m_scrollRect.objectsToFill = m_chatElementInfoList.ToArray(); m_scrollRect.totalCount = m_chatElementInfoList.Count; m_scrollRect.RefillCells(); // scroll to bottom m_scrollRect.RefillCellsFromEnd(); }
private void SetAwardData(List <AwardPB> winRunningItem) { Debug.Log("ActivityAwardWindow " + winRunningItem.Count); _winRunningItem = winRunningItem; _awardList.UpdateCallback = AwardListUpdateCallback; _awardList.totalCount = _winRunningItem.Count; _awardList.RefreshCells(); _awardList.RefillCells(); }
private void RefreshLogList() { lsManorLog.totalCount = listLogs.Count; lsManorLog.RefillCells(); _nullTips.SetActive(false); if (listLogs.Count <= 0) { _nullTips.SetActive(true); } }
public async void OnContentLoaded(Content content) { scrollRect.ClearCells(); scrollRect.totalCount = content.Season.tiers.Count + 1; var tiers = new List <TierData>(content.Season.tiers) { new TierData { isScrollRectFix = true } }; for (var i = 0; i < tiers.Count - 1; i++) { var tier = tiers[i]; tier.index = i; if (tier.Meta.parsedCriteria == default) { tier.Meta.parsedCriteria = tier.Meta.criteria.Select(Criterion.Parse).ToList(); } if (tier.Meta.parsedStages == default) { tier.Meta.parsedStages = new List <Level>(); tier.Meta.validStages = new List <bool>(); for (var stage = 0; stage < Math.Min(tier.Meta.stages.Count, 3); stage++) { var level = tier.Meta.stages[stage].ToLevel(LevelType.Tier); tier.Meta.parsedStages.Add(level); tier.Meta.validStages.Add(level.IsLocal && level.Type == LevelType.Tier && level.Meta.version == tier.Meta.stages[stage].Version); } } } scrollRect.objectsToFill = tiers.Cast <object>().ToArray(); scrollRect.RefillCells(); scrollRect.GetComponent <TransitionElement>().Apply(it => { it.Leave(false, true); it.Enter(); }); LayoutFixer.Fix(scrollRect.content, count: 6); if (lastScrollPosition > -1) { await UniTask.DelayFrame(5); LayoutFixer.Fix(scrollRect.content, count: 6); scrollRect.SetVerticalNormalizedPositionFix(lastScrollPosition); } StartCoroutine(SnapCoroutine()); }
/// <summary> /// 生成好友列表UI /// </summary> private void GenerateFriendListUI() { lsFriendList.ClearCells(); lsFriendList.totalCount = StaticData.playerInfoData.listFriendInfo.Count; if (lsFriendList.totalCount > 0) { _QCharacter.gameObject.SetActive(false); } else { ShowEmptyTip(FriendTabTags.TabFriendList); } lsFriendList.RefillCells(); GenerateFriendAmountUI(true); }
public override void Open() { base.Open(); var dict = ArchiveManager.instance.AccountInfo._Materials.GetDictionary(); var list = new List <int>(dict.Keys); _Rect.SetData(list.ToArray()); _Rect.RefillCells(); var ui = UIManager.Instance.GetCurrentResidentUI <TopResidentUI>(); if (ui != null) { ui.UpdateView(true); } }
protected override void Render() { var collection = LoadedPayload.Collection; titleText.text = LoadedPayload.TitleOverride ?? collection.title; sloganText.text = LoadedPayload.SloganOverride ?? collection.slogan; sloganText.transform.parent.RebuildLayout(); scrollRect.totalCount = collection.levels.Count; scrollRect.objectsToFill = collection.levels.Select(it => new LevelView { Level = it.ToLevel(LoadedPayload.Type), DisplayOwner = true }).ToArray().Cast <object>().ToArray(); scrollRect.RefillCells(); if (LoadedPayload.ScrollPosition > -1) { scrollRect.SetVerticalNormalizedPositionFix(LoadedPayload.ScrollPosition); } base.Render(); }
public override void Open(NavigationData data = null) { base.Open(data); UIManager.Instance.Open <TopResidentUI>(); try { #if UNITY_ANDROID && !UNITY_EDITOR _Rect.SetData("Alarm.mp3"); #elif UNITY_STANDALONE_WIN || UNITY_EDITOR _Rect.SetData("Alarm.mp3"); //_Rect.SetData(Recursive(AudioManager.instance._FullPath).ToArray()); #endif _Rect.RefillCells(); } catch (System.Exception ex) { Debug.LogError("AudioSelectUI ex=" + ex.Message); } }
public void SetMyCardData(List <UserCardVo> cards, PlayerPB filter = PlayerPB.None) { _cardList.RefillCells(); _originalData = cards; if (filter != PlayerPB.None) { _data = cards.FindAll(match => { return(match.CardVo.Player == filter); }); } else { Toggle toggle = _tabBar.GetChild(0).GetComponent <Toggle>(); if (toggle.isOn != true) { toggle.isOn = true; } _data = cards; } _cardList.totalCount = _data.Count; _cardList.RefreshCells(); }
public void SetListData(PlayerPB pb = PlayerPB.None, bool isFun = false) { if (_allData == null) { return; } if (isFun) { _data1 = _allData.FindAll(match => { return(match.Resource == SortResouce.Fans && match.DrawEvent == _showDrawEvent); }); _cardFunShowList.RefillCells(); _cardFunShowList.totalCount = _data1.Count; _cardFunShowList.gameObject.Show(); _cardShowList.gameObject.Hide(); _cardFunShowList.RefreshCells(); } else { if (pb != PlayerPB.None) { _data1 = _allData.FindAll(match => { return(match.Resource != SortResouce.Fans && match.Player == pb && match.DrawEvent == _showDrawEvent); }); } else { _data1 = _allData.FindAll(match => { return(match.Resource != SortResouce.Fans && match.DrawEvent == _showDrawEvent); }); } _cardShowList.RefillCells();//解决更新列表元素,index超出范围的问题 _cardShowList.totalCount = _data1.Count; _cardFunShowList.gameObject.Hide(); _cardShowList.gameObject.Show(); _cardShowList.RefreshCells(); } }
/// <summary> /// 更改列表 /// </summary> /// <param name="coutn"></param> public void ChangeList(int count) { m_OADList.ClearCells(); m_OADList.totalCount = count; m_OADList.RefillCells(); }
/// <summary> /// 更新循环列表长度且重新刷新 /// </summary> /// <param name="length"></param> private void UpdateLoopLength(int length) { _loopVertical.totalCount = length; _loopVertical.RefillCells(); }
private void SetPropDropList() { _propDropList.RefillCells(); _propDropList.totalCount = _starUpList.Count; _propDropList.RefreshCells(); }
/// <summary> /// 更新循环列表长度且重新刷新 /// </summary> /// <param name="length"></param> private void UpdateLoopLength(int length) { loopVerticalScrollRect.totalCount = length; loopVerticalScrollRect.RefillCells(); }
public void GenerateSeedListUI() { lsSeedList.ClearCells(); lsSeedList.totalCount = listShopSeedList.Count; lsSeedList.RefillCells(); }
public void GenerateOrnamentListUI() { lsOrnamentList.ClearCells(); lsOrnamentList.totalCount = listShopOrnamentList.Count; lsOrnamentList.RefillCells(); }
public void GenerateItemListUI() { lsItemList.ClearCells(); lsItemList.totalCount = listShopItemList.Count; lsItemList.RefillCells(); }