|
@@ -52,26 +52,16 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnShown();
|
|
|
CardSProxy.GetCardInfos().Coroutine();
|
|
|
-
|
|
|
- _ui.m_listRole.selectedIndex = this._selectType;
|
|
|
+ int listRoleSelect = this.viewData != null ? (int)this.viewData : 0;
|
|
|
+ _ui.m_listRole.selectedIndex = listRoleSelect;
|
|
|
_ui.m_listRole.numItems = listRoleCount;
|
|
|
- this.UpdateCardList(_ui.m_listRole.selectedIndex);
|
|
|
+ this.UpdateCardList((int)_ui.m_listRole.GetChildAt(_ui.m_listRole.selectedIndex).data);
|
|
|
|
|
|
}
|
|
|
private void UpdateCardList(int rarity = 0)
|
|
|
{
|
|
|
- // _ui.m_listCard.numItems = 0;
|
|
|
-
|
|
|
- // Dictionary<int, CardData> cardDic = CardDataManager.GetCardDicByRarity(rarity);
|
|
|
-
|
|
|
- // if (cardDic == null)
|
|
|
- // {
|
|
|
- // _ui.m_listCard.numItems = 0;
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- List<CardData> cardList = CardDataManager.GetCardListByRarity(rarity);// CardDataManager.CardDicToList(cardDic);
|
|
|
+
|
|
|
+ List<CardData> cardList = CardDataManager.GetCardListByRarity(rarity);
|
|
|
if (CardDataManager._selectList.Keys.Count > 0)
|
|
|
{
|
|
|
//筛选
|
|
@@ -80,8 +70,6 @@ namespace GFGGame
|
|
|
_ui.m_listCard.data = cardList;
|
|
|
_ui.m_listCard.numItems = cardList.Count;
|
|
|
|
|
|
- // }
|
|
|
-
|
|
|
_ui.m_txtTips.visible = _ui.m_listCard.numItems == 0 ? true : false;
|
|
|
}
|
|
|
private void RenderListCardItem(int index, GObject obj)
|
|
@@ -102,7 +90,7 @@ namespace GFGGame
|
|
|
private void OnClickListCardItem(EventContext context)
|
|
|
{
|
|
|
|
|
|
- ViewManager.Show(ViewName.CARD_FOSTER_VIEW, (context.data as GObject).data, new object[] { ViewName.CARD_DETAIL_VIEW });
|
|
|
+ ViewManager.Show(ViewName.CARD_FOSTER_VIEW, (context.data as GObject).data, new object[] { ViewName.CARD_DETAIL_VIEW, _ui.m_listRole.selectedIndex });
|
|
|
this.Clear();
|
|
|
|
|
|
}
|
|
@@ -113,7 +101,7 @@ namespace GFGGame
|
|
|
private void OnClickListRoleItem(EventContext context)
|
|
|
{
|
|
|
int index = (int)(context.data as GObject).data;
|
|
|
- this._selectType = index == 0 ? 0 : listRoleCount - index;
|
|
|
+ // this._selectType = index == 0 ? 0 : listRoleCount - index;
|
|
|
this.UpdateCardList(index);
|
|
|
|
|
|
}
|
|
@@ -139,7 +127,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private void Clear()
|
|
|
{
|
|
|
- this._selectType = 0;
|
|
|
+ // this._selectType = 0;
|
|
|
CardDataManager._selectList.Clear();
|
|
|
_ui.m_listRole.selectedIndex = 0;
|
|
|
_ui.m_listCard.selectedIndex = 0;
|