zhangyuqian 1 rok pred
rodič
commit
45ea5d55e2

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_CardFosterUI.cs

@@ -15,6 +15,7 @@ namespace UI.Card
         public GLoader m_loaListener1;
         public UI_ComFosterTop m_ComFosterTop;
         public UI_ComFosterBottom m_ComFosterBottom;
+        public GButton m_cardSyntheticBtn;
         public GLoader m_loaGuide;
         public GButton m_btnLeft;
         public GButton m_btnRight;
@@ -77,6 +78,7 @@ namespace UI.Card
             m_loaListener1 = (GLoader)comp.GetChild("loaListener1");
             m_ComFosterTop = (UI_ComFosterTop)UI_ComFosterTop.Create(comp.GetChild("ComFosterTop"));
             m_ComFosterBottom = (UI_ComFosterBottom)UI_ComFosterBottom.Create(comp.GetChild("ComFosterBottom"));
+            m_cardSyntheticBtn = (GButton)comp.GetChild("cardSyntheticBtn");
             m_loaGuide = (GLoader)comp.GetChild("loaGuide");
             m_btnLeft = (GButton)comp.GetChild("btnLeft");
             m_btnRight = (GButton)comp.GetChild("btnRight");
@@ -99,6 +101,7 @@ namespace UI.Card
             m_ComFosterTop = null;
             m_ComFosterBottom.Dispose();
             m_ComFosterBottom = null;
+            m_cardSyntheticBtn = null;
             m_loaGuide = null;
             m_btnLeft = null;
             m_btnRight = null;

+ 8 - 2
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -2,6 +2,7 @@
 using UI.Card;
 using UI.CommonGame;
 using UI_ComConsume = UI.Card.UI_ComConsume;
+using UI.ClothingSynthetic;
 using System.Collections.Generic;
 using UnityEngine;
 using System.Linq;
@@ -129,7 +130,7 @@ namespace GFGGame
 
             _ui.m_btnLeft.onClick.Add(OnClickBtnLeft);
             _ui.m_btnRight.onClick.Add(OnClickBtnRight);
-
+            _ui.m_cardSyntheticBtn.onClick.Add(OnClickBtnCardSyntheticView);
             //_ui.m_loaCard.onClick.Add(OnClickLoaCard);
             //_ui.m_loaListener1.onClick.Add(OnClickLoaCard);
             //_ui.m_comImgCard.target.onClick.Add(OnClickLoaCard);
@@ -279,7 +280,7 @@ namespace GFGGame
 
             _ui.m_ComFosterTop.m_c1.selectedIndex = _ui.m_ComFosterBottom.m_c_from.selectedIndex;
             _nowIndex = _cardData.index;
-
+            _ui.m_cardSyntheticBtn.icon = "ui://ClothingSynthetic/kphc_huimeng";
             RefCardFosterInfo();
         }
         protected override void AddEventListener()
@@ -1364,5 +1365,10 @@ namespace GFGGame
             _ui.m_comImgCard.target.SetXY(_ui.m_comImgCard.target.x, _ui.m_comImgCard.target.y - ViewGlobal.GetRealTopOffset());
             _ui.m_comImgCard.target.SetSize(_ui.m_comImgCard.target.width, ViewGlobal.GetRealTopOffset() + _ui.target.height);
         }
+
+        private void OnClickBtnCardSyntheticView()
+        {
+              ViewManager.Show<CardSyntheticView>(new object[] { _cardData.id });
+        }
     }
 }

+ 23 - 12
GameClient/Assets/Game/HotUpdate/Views/ClothingUpgarde/ClothingUpgradeView.cs

@@ -138,18 +138,30 @@ namespace GFGGame
                 _ui.m_c2.selectedIndex = collegeBoostNextCfg.consumeArr.Length;  
                 for (int i=0;i< collegeBoostNextCfg.consumeArr.Length;i++)
                 {
-                    UI_ComItem000 item = UI_ComItem000.Proxy(itemList[i]);
-                    int id = collegeBoostNextCfg.consumeArr[i][0];
-                    int count = collegeBoostNextCfg.consumeArr[i][1];
-                    ItemData itemDate = ItemUtil.createItemData(id, count);
-                    ItemView itemView = new ItemView(item.target);
-                    itemView.SetData(itemDate); 
-                    if(item.target.data == null)
+                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(collegeBoostNextCfg.consumeArr[i][0]);
+                    UI_ComItem item = UI_ComItem.Proxy(itemList[i]);
+                    item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
+                    //item.m_txtCount.SetVar("count", itemData.num.ToString()).FlushVars();
+                    ItemData itemCount;
+                    long count;
+                    if (BagDataManager.Instance.GetBagData().TryGetValue(collegeBoostNextCfg.consumeArr[i][0], out itemCount))
+                    {
+                        count = itemCount.num;
+                    }
+                    else
+                    {
+                        count = 0;
+                    }
+                    item.m_txtCount.text = collegeBoostNextCfg.consumeArr[i][1].ToString() + "/" + count.ToString();
+                    item.m_QualityType.selectedIndex = itemCfg.rarity - 1;
+                    item.m_ShowName.selectedIndex = 1;
+                    item.m_txtName.text = itemCfg.name;
+                    if (item.target.data == null)
                     {
                         item.target.onClick.Add(OnClickListDressUpItem);
                     }
-                    item.target.data = id;
-                    UI_ComItem000.ProxyEnd();
+                    item.target.data = collegeBoostNextCfg.consumeArr[i][0];
+                    UI_ComItem.ProxyEnd();
                 }
             }
         }
@@ -174,9 +186,8 @@ namespace GFGGame
         private void OnClickListDressUpItem(EventContext eventContext)
         {
             int id = (int)(eventContext.sender as GObject).data;
-
-            object[] goBackDatas = ViewManager.GetGoBackDatas(typeof(ClothingUpgradeView).Name);
-            object[] sourceDatas = new object[] { id, goBackDatas, 1 };
+            object[] sourceDatas = new object[]
+                  { id, new object[] { typeof(BagView).FullName, this.viewData } };
             GoodsItemTipsController.ShowItemTips(id, sourceDatas);
         }
         private async void OnClickUpgrade()

BIN
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes


BIN
GameClient/Assets/ResIn/UI/ClothingUpgrade/ClothingUpgrade_fui.bytes