Browse Source

换装标签显示错误

zhaoyang 2 years ago
parent
commit
00666f1232
1 changed files with 5 additions and 4 deletions
  1. 5 4
      GameClient/Assets/Game/HotUpdate/Views/DressUp/DressFilterView.cs

+ 5 - 4
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressFilterView.cs

@@ -69,7 +69,7 @@ namespace GFGGame
         {
             _ui.m_listRarity.numItems = ConstDressRarity.DressRarityList().Count;
             _ui.m_listScore.numItems = ConstDressUpScoreType.scoreTypeList().Count;
-            _ui.m_listTag.numItems = ConstDressTag.DressTagList().Count;
+            _ui.m_listTag.numItems = TagCfgArray.Instance.dataArray.Length;//  ConstDressTag.DressTagList().Count;
         }
 
         private void RenderListRarityItem(int index, GObject obj)
@@ -92,10 +92,11 @@ namespace GFGGame
         private void RenderListTagItem(int index, GObject obj)
         {
             GButton item = obj.asButton;
-            item.text = ConstDressTag.DressTagList()[index].name;
-            item.icon = "ui://DressUp/sxsx_fgdi_" + ConstDressTag.DressTagList()[index].type;
+            TagCfg tagCfg = TagCfgArray.Instance.dataArray[index];
+            item.text = tagCfg.name;
+            item.icon = "ui://DressUp/sxsx_fgdi_" + tagCfg.type;
             // item.data = 
-            string data = string.Format("{0}_{1}", ConstDressTag.DressTagList()[index].type, ConstDressTag.DressTagList()[index].name);
+            string data = string.Format("{0}_{1}", tagCfg.type, tagCfg.name);
             item.data = data;
             item.selected = _selectTagList.IndexOf(data) >= 0;
         }