|
@@ -46,13 +46,13 @@ namespace GFGGame
|
|
|
_ui.m_btnReset.onClick.Add(OnClickBtnReset);
|
|
|
_ui.m_btnClose.onClick.Add(this.OnHide);
|
|
|
|
|
|
- _ui.m_listRarity.itemRenderer = RenderListRarityItem;
|
|
|
- _ui.m_listScore.itemRenderer = RenderListScoreItem;
|
|
|
- _ui.m_listTag.itemRenderer = RenderListTagItem;
|
|
|
+ _ui.m_comSearch.m_listRarity.itemRenderer = RenderListRarityItem;
|
|
|
+ _ui.m_comSearch.m_listScore.itemRenderer = RenderListScoreItem;
|
|
|
+ _ui.m_comSearch.m_listTag.itemRenderer = RenderListTagItem;
|
|
|
|
|
|
- _ui.m_listRarity.onClickItem.Add(OnClickListRarityItem);
|
|
|
- _ui.m_listScore.onClickItem.Add(OnClickListScoreItem);
|
|
|
- _ui.m_listTag.onClickItem.Add(OnClickListTagItem);
|
|
|
+ _ui.m_comSearch.m_listRarity.onClickItem.Add(OnClickListRarityItem);
|
|
|
+ _ui.m_comSearch.m_listScore.onClickItem.Add(OnClickListScoreItem);
|
|
|
+ _ui.m_comSearch.m_listTag.onClickItem.Add(OnClickListTagItem);
|
|
|
}
|
|
|
|
|
|
protected override void OnShown()
|
|
@@ -67,9 +67,10 @@ namespace GFGGame
|
|
|
}
|
|
|
private void UpdateView()
|
|
|
{
|
|
|
- _ui.m_listRarity.numItems = ConstDressRarity.DressRarityList().Count;
|
|
|
- _ui.m_listScore.numItems = ConstDressUpScoreType.scoreTypeList().Count;
|
|
|
- _ui.m_listTag.numItems = TagCfgArray.Instance.dataArray.Length;// ConstDressTag.DressTagList().Count;
|
|
|
+ _ui.m_comSearch.m_listRarity.numItems = ConstDressRarity.DressRarityList().Count;
|
|
|
+ _ui.m_comSearch.m_listScore.numItems = ConstDressUpScoreType.scoreTypeList().Count;
|
|
|
+ _ui.m_comSearch.m_listTag.numItems = TagCfgArray.Instance.dataArray.Length;// ConstDressTag.DressTagList().Count;
|
|
|
+ _ui.m_comSearch.m_listTag.ResizeToFit();
|
|
|
}
|
|
|
|
|
|
private void RenderListRarityItem(int index, GObject obj)
|
|
@@ -177,11 +178,17 @@ namespace GFGGame
|
|
|
}
|
|
|
private void OnClickBtnConfirm()
|
|
|
{
|
|
|
- ViewManager.Show<ModalStatusView>("搜索中...");
|
|
|
DressUpMenuItemDataManager.dressFilterType = DressFilterType.Filter;
|
|
|
DressUpMenuItemDataManager.selectRarityList = _selectRarityList;
|
|
|
DressUpMenuItemDataManager.selectScoreList = _selectScoreList;
|
|
|
DressUpMenuItemDataManager.selectTagList = _selectTagList;
|
|
|
+ if (_selectRarityList.Count == 0 && _selectScoreList.Count == 0 && _selectTagList.Count == 0)
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("未选择要搜索的类型");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ ViewManager.Show<ModalStatusView>("搜索中...");
|
|
|
+
|
|
|
EventAgent.DispatchEvent(ConstMessage.DRESS_FILTER, ConstMessage.DRESS_FILTER);
|
|
|
ResetSearch();
|
|
|
this.OnHide();
|
|
@@ -201,9 +208,9 @@ namespace GFGGame
|
|
|
DressUpMenuItemDataManager.selectRarityList.Clear();
|
|
|
DressUpMenuItemDataManager.selectScoreList.Clear();
|
|
|
DressUpMenuItemDataManager.selectTagList.Clear();
|
|
|
- _ui.m_listRarity.SelectNone();
|
|
|
- _ui.m_listScore.SelectNone();
|
|
|
- _ui.m_listTag.SelectNone();
|
|
|
+ _ui.m_comSearch.m_listRarity.SelectNone();
|
|
|
+ _ui.m_comSearch.m_listScore.SelectNone();
|
|
|
+ _ui.m_comSearch.m_listTag.SelectNone();
|
|
|
}
|
|
|
private void ResetSearch()
|
|
|
{
|
|
@@ -213,9 +220,9 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnHide();
|
|
|
this.Hide();
|
|
|
- _ui.m_listRarity.SelectNone();
|
|
|
- _ui.m_listScore.SelectNone();
|
|
|
- _ui.m_listTag.SelectNone();
|
|
|
+ _ui.m_comSearch.m_listRarity.SelectNone();
|
|
|
+ _ui.m_comSearch.m_listScore.SelectNone();
|
|
|
+ _ui.m_comSearch.m_listTag.SelectNone();
|
|
|
}
|
|
|
}
|
|
|
}
|