|
@@ -77,6 +77,7 @@ namespace GFGGame
|
|
|
|
|
|
// _ui.m_comboBox.items = new string[] { "我的套装一", "我的套装二", "我的套装三", "我的套装四", "我的套装五", "我的套装六" };
|
|
// _ui.m_comboBox.items = new string[] { "我的套装一", "我的套装二", "我的套装三", "我的套装四", "我的套装五", "我的套装六" };
|
|
_ui.m_partsList.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
|
|
_ui.m_partsList.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
|
|
|
|
+ _ui.m_partsListSearch.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
|
|
|
|
|
|
InitLists();
|
|
InitLists();
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
@@ -89,10 +90,12 @@ namespace GFGGame
|
|
// _ui.m_partsList.m_list.SetVirtual();
|
|
// _ui.m_partsList.m_list.SetVirtual();
|
|
_ui.m_partsList.m_list.onClickItem.Add(OnClickPartsListItem);
|
|
_ui.m_partsList.m_list.onClickItem.Add(OnClickPartsListItem);
|
|
_ui.m_partsList2.m_list.onClickItem.Add(OnClickSuitPartsListItem);
|
|
_ui.m_partsList2.m_list.onClickItem.Add(OnClickSuitPartsListItem);
|
|
|
|
+ _ui.m_partsListSearch.m_list.onClickItem.Add(OnClickPartsListItem);
|
|
_ui.m_touchPad.onClick.Add(OnTouchPad);
|
|
_ui.m_touchPad.onClick.Add(OnTouchPad);
|
|
_ui.m_btnDelete.onClick.Add(OnClickBtnDelete);
|
|
_ui.m_btnDelete.onClick.Add(OnClickBtnDelete);
|
|
_ui.m_btnSave.onClick.Add(OnClickBtnSave);
|
|
_ui.m_btnSave.onClick.Add(OnClickBtnSave);
|
|
_ui.m_partsList.m_comboBoxRarity.onChanged.Add(OnComboBoxRarityChanged);
|
|
_ui.m_partsList.m_comboBoxRarity.onChanged.Add(OnComboBoxRarityChanged);
|
|
|
|
+ _ui.m_partsListSearch.m_comboBoxRarity.onChanged.Add(OnSearchComboBoxRarityChanged);
|
|
_ui.m_btnAction.onClick.Add(OnClickBtnAction);
|
|
_ui.m_btnAction.onClick.Add(OnClickBtnAction);
|
|
_ui.m_btnSearch.onClick.Add(OnClickBtnSearch);
|
|
_ui.m_btnSearch.onClick.Add(OnClickBtnSearch);
|
|
_ui.m_btnNext.onClick.Add(OnClickBtnNext);
|
|
_ui.m_btnNext.onClick.Add(OnClickBtnNext);
|
|
@@ -107,12 +110,32 @@ namespace GFGGame
|
|
_ui.m_partsList2.m_imgTop.visible = true;
|
|
_ui.m_partsList2.m_imgTop.visible = true;
|
|
_ui.m_partsList.m_imgTop.visible = false;
|
|
_ui.m_partsList.m_imgTop.visible = false;
|
|
}
|
|
}
|
|
|
|
+ private void InitLists()
|
|
|
|
+ {
|
|
|
|
+ _ui.m_comListType2.m_listType.itemRenderer = ListType2Item;
|
|
|
|
+ _ui.m_partsList.m_list.itemRenderer = ListPartsItem;
|
|
|
|
+ _ui.m_partsList2.m_list.itemRenderer = ListParts2Item;
|
|
|
|
+ _ui.m_partsListSearch.m_list.itemRenderer = ListPartsItem;
|
|
|
|
+ listType1X = _ui.m_comListType1.target.x;
|
|
|
|
+ partsListX = _ui.m_partsList.target.x - _ui.m_partsList.target.width;// - DressUpView.RIGHT_BLANK;
|
|
|
|
+ //一级菜单
|
|
|
|
+ _ui.m_comListType1.m_listType.itemRenderer = ListType1Item;
|
|
|
|
+ _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length;
|
|
|
|
+ //_ui.m_comListType1.m_listType1.ResizeToFit(_ui.m_comListType1.m_listType1.numItems);
|
|
|
|
+ float maxHeight = _ui.target.height - _ui.m_comListType1.target.y - DressUpView.BOTTOM_BLANK;
|
|
|
|
+ if (_ui.m_comListType1.m_listType.height > maxHeight)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_comListType1.m_listType.height = maxHeight;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
{
|
|
{
|
|
base.AddEventListener();
|
|
base.AddEventListener();
|
|
EventAgent.AddEventListener(ConstMessage.CLOSE_PHOTOGRAPHVIEW, UpdateScene);
|
|
EventAgent.AddEventListener(ConstMessage.CLOSE_PHOTOGRAPHVIEW, UpdateScene);
|
|
EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
|
|
EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
|
|
- EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdatePartsListSort);
|
|
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
|
|
}
|
|
}
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
@@ -165,6 +188,7 @@ namespace GFGGame
|
|
EventAgent.RemoveEventListener(ConstMessage.CLOSE_PHOTOGRAPHVIEW, UpdateScene);
|
|
EventAgent.RemoveEventListener(ConstMessage.CLOSE_PHOTOGRAPHVIEW, UpdateScene);
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdatePartsListSort);
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdatePartsListSort);
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
|
|
}
|
|
}
|
|
private void OnClickBtnBack()
|
|
private void OnClickBtnBack()
|
|
{
|
|
{
|
|
@@ -423,6 +447,16 @@ namespace GFGGame
|
|
this.showListType1();
|
|
this.showListType1();
|
|
this.hideListType2();
|
|
this.hideListType2();
|
|
}
|
|
}
|
|
|
|
+ else if (this.currentListType == DressUpListType.List4)
|
|
|
|
+ {
|
|
|
|
+ this.showListType1();
|
|
|
|
+ this.hideListType2();
|
|
|
|
+ }
|
|
|
|
+ else if (this.currentListType == DressUpListType.List5)
|
|
|
|
+ {
|
|
|
|
+ this.showListType1();
|
|
|
|
+ this.hideSearchListType();
|
|
|
|
+ }
|
|
// _ui.m_comListType1.m_listType.numItems = _ui.m_comListType1.m_listType.numItems;
|
|
// _ui.m_comListType1.m_listType.numItems = _ui.m_comListType1.m_listType.numItems;
|
|
// this.ShowSubList();
|
|
// this.ShowSubList();
|
|
}
|
|
}
|
|
@@ -446,6 +480,11 @@ namespace GFGGame
|
|
_rarityIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
|
|
_rarityIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
|
|
this.UpdatePartsListSort();
|
|
this.UpdatePartsListSort();
|
|
}
|
|
}
|
|
|
|
+ private void OnSearchComboBoxRarityChanged()
|
|
|
|
+ {
|
|
|
|
+ _rarityIndex = _ui.m_partsListSearch.m_comboBoxRarity.selectedIndex;
|
|
|
|
+ this.UpdateSearchList();
|
|
|
|
+ }
|
|
|
|
|
|
private void OnClickBtnAction()
|
|
private void OnClickBtnAction()
|
|
{
|
|
{
|
|
@@ -456,23 +495,7 @@ namespace GFGGame
|
|
ViewManager.Show<DressFilterView>(true, new object[] { ViewName.DRESS_UP_VIEW });
|
|
ViewManager.Show<DressFilterView>(true, new object[] { ViewName.DRESS_UP_VIEW });
|
|
}
|
|
}
|
|
|
|
|
|
- private void InitLists()
|
|
|
|
- {
|
|
|
|
- _ui.m_comListType2.m_listType.itemRenderer = ListType2Item;
|
|
|
|
- _ui.m_partsList.m_list.itemRenderer = ListPartsItem;
|
|
|
|
- _ui.m_partsList2.m_list.itemRenderer = ListParts2Item;
|
|
|
|
- listType1X = _ui.m_comListType1.target.x;
|
|
|
|
- partsListX = _ui.m_partsList.target.x - _ui.m_partsList.target.width;// - DressUpView.RIGHT_BLANK;
|
|
|
|
- //一级菜单
|
|
|
|
- _ui.m_comListType1.m_listType.itemRenderer = ListType1Item;
|
|
|
|
- _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length;
|
|
|
|
- //_ui.m_comListType1.m_listType1.ResizeToFit(_ui.m_comListType1.m_listType1.numItems);
|
|
|
|
- float maxHeight = _ui.target.height - _ui.m_comListType1.target.y - DressUpView.BOTTOM_BLANK;
|
|
|
|
- if (_ui.m_comListType1.m_listType.height > maxHeight)
|
|
|
|
- {
|
|
|
|
- _ui.m_comListType1.m_listType.height = maxHeight;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
private void showListType1()
|
|
private void showListType1()
|
|
{
|
|
{
|
|
@@ -600,7 +623,6 @@ namespace GFGGame
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
private void showListParts2(int suitId)
|
|
private void showListParts2(int suitId)
|
|
{
|
|
{
|
|
_currentSuitId = suitId;
|
|
_currentSuitId = suitId;
|
|
@@ -638,7 +660,71 @@ namespace GFGGame
|
|
_ui.m_partsList2.target.x = t.value.x;
|
|
_ui.m_partsList2.target.x = t.value.x;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private void showSearchListType()
|
|
|
|
+ {
|
|
|
|
+ // _currentList2 = null;
|
|
|
|
+ currentListType = DressUpListType.List5;
|
|
|
|
+ GTween.To(_ui.target.width, partsListX, 0.5f)
|
|
|
|
+ .SetTarget(_ui.m_partsListSearch.target)
|
|
|
|
+ .OnUpdate((GTweener t) =>
|
|
|
|
+ {
|
|
|
|
+ _ui.m_partsListSearch.target.x = t.value.x;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ private void hideSearchListType()
|
|
|
|
+ {
|
|
|
|
+ GTween.To(partsListX, _ui.target.width, 0.5f)
|
|
|
|
+ .SetTarget(_ui.m_partsListSearch.target)
|
|
|
|
+ .OnUpdate((GTweener t) =>
|
|
|
|
+ {
|
|
|
|
+ _ui.m_partsListSearch.target.x = t.value.x;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
/****************************************************************************************************************************/
|
|
/****************************************************************************************************************************/
|
|
|
|
+ private void DressResetSerch()
|
|
|
|
+ {
|
|
|
|
+ if (currentListType == DressUpListType.List5)
|
|
|
|
+ {
|
|
|
|
+ OnTouchPad();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ private void UpdateSerch(EventContext context)
|
|
|
|
+ {
|
|
|
|
+ if (context.data.ToString() == ConstMessage.DRESS_SEARCH)
|
|
|
|
+ {
|
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.DressSearch();
|
|
|
|
+ }
|
|
|
|
+ else if (context.data.ToString() == ConstMessage.DRESS_FILTER)
|
|
|
|
+ {
|
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.DressFilter();
|
|
|
|
+ }
|
|
|
|
+ ViewManager.Hide<ModalStatusView>();
|
|
|
|
+ UpdateSearchList();
|
|
|
|
+ if (currentListType != DressUpListType.List5)
|
|
|
|
+ {
|
|
|
|
+ hideListParts();
|
|
|
|
+ hideListParts2();
|
|
|
|
+ hideListType1();
|
|
|
|
+ hideListType2();
|
|
|
|
+ showSearchListType();
|
|
|
|
+ }
|
|
|
|
+ _currentMenuType = 0;
|
|
|
|
+ }
|
|
|
|
+ private void UpdateSearchList()
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ if (_rarityIndex == SORT_BY_HIGH_RARITY)
|
|
|
|
+ {
|
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemListByHighRarity(_currentList3);
|
|
|
|
+ }
|
|
|
|
+ else if (_rarityIndex == SORT_BY_LOW_RARITY)
|
|
|
|
+ {
|
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemListByLowRarity(_currentList3);
|
|
|
|
+ }
|
|
|
|
+ _currentMenuType = 0;
|
|
|
|
+ _ui.m_partsListSearch.m_list.numItems = _currentList3.Count; ;
|
|
|
|
+ }
|
|
private void ListType1Item(int index, GObject item)
|
|
private void ListType1Item(int index, GObject item)
|
|
{
|
|
{
|
|
UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
|
|
UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
|
|
@@ -750,7 +836,7 @@ namespace GFGGame
|
|
listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
|
|
listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
|
|
listItem.m_txtTitle.text = partName;
|
|
listItem.m_txtTitle.text = partName;
|
|
listItem.target.data = id;
|
|
listItem.target.data = id;
|
|
- listItem.m_txtScore.visible = false;
|
|
|
|
|
|
+ listItem.m_grpScore.visible = false;
|
|
//listItem.m_ScoreType.visible = true;
|
|
//listItem.m_ScoreType.visible = true;
|
|
listItem.m_imgNeed.visible = false;
|
|
listItem.m_imgNeed.visible = false;
|
|
|
|
|
|
@@ -794,7 +880,7 @@ namespace GFGGame
|
|
listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, "png");
|
|
listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, "png");
|
|
listItem.m_txtTitle.text = partName;
|
|
listItem.m_txtTitle.text = partName;
|
|
listItem.target.data = id;
|
|
listItem.target.data = id;
|
|
- listItem.m_txtScore.visible = false;
|
|
|
|
|
|
+ listItem.m_grpScore.visible = false;
|
|
//listItem.m_ScoreType.visible = true;
|
|
//listItem.m_ScoreType.visible = true;
|
|
listItem.m_imgNeed.visible = false;
|
|
listItem.m_imgNeed.visible = false;
|
|
bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
|
|
bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
|
|
@@ -904,14 +990,14 @@ namespace GFGGame
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
- if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
|
|
|
|
- {
|
|
|
|
- _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3);
|
|
|
|
- }
|
|
|
|
- else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
|
|
|
|
- {
|
|
|
|
- _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3);
|
|
|
|
- }
|
|
|
|
|
|
+ // if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
|
|
|
|
+ // {
|
|
|
|
+ // _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3);
|
|
|
|
+ // }
|
|
|
|
+ // else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
|
|
|
|
+ // {
|
|
|
|
+ // _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3);
|
|
|
|
+ // }
|
|
|
|
|
|
_ui.m_partsList.m_list.RemoveChildrenToPool();
|
|
_ui.m_partsList.m_list.RemoveChildrenToPool();
|
|
_ui.m_partsList.m_list.numItems = _currentList3.Count;
|
|
_ui.m_partsList.m_list.numItems = _currentList3.Count;
|
|
@@ -930,14 +1016,14 @@ namespace GFGGame
|
|
_currentList4.Add(_currentSuitId);
|
|
_currentList4.Add(_currentSuitId);
|
|
}
|
|
}
|
|
|
|
|
|
- if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
|
|
|
|
- {
|
|
|
|
- _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4);
|
|
|
|
- }
|
|
|
|
- else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
|
|
|
|
- {
|
|
|
|
- _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4);
|
|
|
|
- }
|
|
|
|
|
|
+ // if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
|
|
|
|
+ // {
|
|
|
|
+ // _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4);
|
|
|
|
+ // }
|
|
|
|
+ // else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
|
|
|
|
+ // {
|
|
|
|
+ // _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4);
|
|
|
|
+ // }
|
|
|
|
|
|
_ui.m_partsList2.m_list.RemoveChildrenToPool();
|
|
_ui.m_partsList2.m_list.RemoveChildrenToPool();
|
|
_ui.m_partsList2.m_list.numItems = _currentList4.Count;
|
|
_ui.m_partsList2.m_list.numItems = _currentList4.Count;
|