소스 검색

消耗调位置

zhaoyang 3 년 전
부모
커밋
ee7e4e4625

+ 2 - 2
FGUIProject/assets/Card/components/ComFosterBottom.xml

@@ -58,7 +58,7 @@
       <item/>
       <item/>
     </list>
-    <component id="n14_ojlz" name="ComLvConsumeGold" src="ojlz61" fileName="components/ComConsumeCurrency.xml" xy="415,1506" group="n58_l2by"/>
+    <component id="n14_ojlz" name="ComLvConsumeGold" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="415,1506" group="n58_l2by"/>
     <component id="n24_842s" name="btnAll" src="842s6q" fileName="components/Button9.xml" pkg="eg2y0ldp" xy="237,1573" size="270,74" group="n58_l2by">
       <Button title="自动选择"/>
     </component>
@@ -81,7 +81,7 @@
       <item/>
       <item/>
     </list>
-    <component id="n51_l2by" name="comStarCousumeGold" src="ojlz61" fileName="components/ComConsumeCurrency.xml" xy="395,1506" size="289,42" group="n57_l2by"/>
+    <component id="n51_l2by" name="comStarCousumeGold" src="ojlz61" fileName="components/ComCostCurrencyWithHas.xml" pkg="eg2y0ldp" xy="395,1506" size="289,42" group="n57_l2by"/>
     <component id="n52_l2by" name="btnUpStar" src="842s6q" fileName="components/Button9.xml" pkg="eg2y0ldp" xy="405,1573" size="270,74" group="n57_l2by">
       <Button title="升星"/>
     </component>

+ 4 - 4
FGUIProject/assets/CommonGame/components/ComCostCurrencyWithHas.xml

@@ -4,9 +4,9 @@
     <image id="n4_a713" name="n4" src="a71377" fileName="imagesExport/kp_dikuang_3.png" xy="60,3"/>
     <text id="n2_ojlz" name="n2" xy="0,0" size="65,42" fontSize="30" color="#7d634a" autoSize="none" text="消耗"/>
     <loader id="n1_ojlz" name="loaIcon" xy="70,-9" size="60,60" url="ui://eg2y0ldpq08x3" autoSize="true"/>
-    <text id="n6_j5a5" name="txtNeed" xy="142,1" size="73,39" group="n9_l4ui" fontSize="28" color="#ffffff" align="center" vAlign="middle" ubb="true" autoClearText="true" text="9993"/>
-    <text id="n8_j5a5" name="txtLine" xy="215,1" size="21,39" group="n9_l4ui" fontSize="28" color="#ffffff" text="/"/>
-    <text id="n7_j5a5" name="txtHas" xy="236,1" size="39,39" group="n9_l4ui" fontSize="28" color="#ffffff" align="center" vAlign="middle" ubb="true" autoClearText="true" text="99"/>
-    <group id="n9_l4ui" name="n9" xy="142,1" size="133,39" advanced="true" layout="hz" excludeInvisibles="true"/>
+    <text id="n7_j5a5" name="txtHas" xy="142,0" size="39,39" group="n9_l4ui" fontSize="28" color="#ffffff" align="center" vAlign="middle" ubb="true" autoClearText="true" text="99"/>
+    <text id="n8_j5a5" name="txtLine" xy="181,1" size="21,39" group="n9_l4ui" fontSize="28" color="#ffffff" text="/"/>
+    <text id="n6_j5a5" name="txtNeed" xy="202,1" size="73,39" group="n9_l4ui" fontSize="28" color="#ffffff" align="center" vAlign="middle" ubb="true" autoClearText="true" text="9993"/>
+    <group id="n9_l4ui" name="n9" xy="142,0" size="133,40" advanced="true" layout="hz" excludeInvisibles="true"/>
   </displayList>
 </component>

+ 4 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_ComFosterBottom.cs

@@ -24,13 +24,13 @@ namespace UI.Card
         public GTextField m_txtCurExp;
         public GTextField m_txtMaxExp;
         public GList m_listLvConsume;
-        public UI_ComConsumeCurrency m_ComLvConsumeGold;
+        public GComponent m_ComLvConsumeGold;
         public GButton m_btnAll;
         public GButton m_btnUpLv;
         public GGroup m_grpLv;
         public UI_ComBigStar m_comStar;
         public GList m_listStarConsume;
-        public UI_ComConsumeCurrency m_comStarCousumeGold;
+        public GComponent m_comStarCousumeGold;
         public GButton m_btnUpStar;
         public GComponent m_comTips;
         public GList m_listShowCard;
@@ -100,13 +100,13 @@ namespace UI.Card
             m_txtCurExp = (GTextField)comp.GetChild("txtCurExp");
             m_txtMaxExp = (GTextField)comp.GetChild("txtMaxExp");
             m_listLvConsume = (GList)comp.GetChild("listLvConsume");
-            m_ComLvConsumeGold = (UI_ComConsumeCurrency)UI_ComConsumeCurrency.Create(comp.GetChild("ComLvConsumeGold"));
+            m_ComLvConsumeGold = (GComponent)comp.GetChild("ComLvConsumeGold");
             m_btnAll = (GButton)comp.GetChild("btnAll");
             m_btnUpLv = (GButton)comp.GetChild("btnUpLv");
             m_grpLv = (GGroup)comp.GetChild("grpLv");
             m_comStar = (UI_ComBigStar)UI_ComBigStar.Create(comp.GetChild("comStar"));
             m_listStarConsume = (GList)comp.GetChild("listStarConsume");
-            m_comStarCousumeGold = (UI_ComConsumeCurrency)UI_ComConsumeCurrency.Create(comp.GetChild("comStarCousumeGold"));
+            m_comStarCousumeGold = (GComponent)comp.GetChild("comStarCousumeGold");
             m_btnUpStar = (GButton)comp.GetChild("btnUpStar");
             m_comTips = (GComponent)comp.GetChild("comTips");
             m_listShowCard = (GList)comp.GetChild("listShowCard");
@@ -132,7 +132,6 @@ namespace UI.Card
             m_txtCurExp = null;
             m_txtMaxExp = null;
             m_listLvConsume = null;
-            m_ComLvConsumeGold.Dispose();
             m_ComLvConsumeGold = null;
             m_btnAll = null;
             m_btnUpLv = null;
@@ -140,7 +139,6 @@ namespace UI.Card
             m_comStar.Dispose();
             m_comStar = null;
             m_listStarConsume = null;
-            m_comStarCousumeGold.Dispose();
             m_comStarCousumeGold = null;
             m_btnUpStar = null;
             m_comTips = null;

+ 6 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComCostCurrencyWithHas.cs

@@ -8,9 +8,9 @@ namespace UI.CommonGame
     {
         public GComponent target;
         public GLoader m_loaIcon;
-        public GTextField m_txtNeed;
-        public GTextField m_txtLine;
         public GTextField m_txtHas;
+        public GTextField m_txtLine;
+        public GTextField m_txtNeed;
         public const string URL = "ui://eg2y0ldpojlz61";
         public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComCostCurrencyWithHas";
@@ -59,16 +59,16 @@ namespace UI.CommonGame
         private void Init(GComponent comp)
         {
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
-            m_txtNeed = (GTextField)comp.GetChild("txtNeed");
-            m_txtLine = (GTextField)comp.GetChild("txtLine");
             m_txtHas = (GTextField)comp.GetChild("txtHas");
+            m_txtLine = (GTextField)comp.GetChild("txtLine");
+            m_txtNeed = (GTextField)comp.GetChild("txtNeed");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaIcon = null;
-            m_txtNeed = null;
-            m_txtLine = null;
             m_txtHas = null;
+            m_txtLine = null;
+            m_txtNeed = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 12 - 6
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -16,6 +16,8 @@ namespace GFGGame
         private UI_CardFosterUI _ui;
         private UI_ComFosterBottom _comFosterBottom;
         private ValueBarController _valueBarController;
+        private UI_ComCostCurrency _comLvConsumeGold;
+        private UI_ComCostCurrencyWithHas _comStarCousumeGold;
         private CardData _cardData = new CardData();
         private int _selectTab = 0;
 
@@ -99,6 +101,9 @@ namespace GFGGame
 
             EventAgent.AddEventListener(ConstMessage.CARD_UP_SKILL, UpdateUpSkillView);
             // EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, OnItemChangeListener);
+            _comLvConsumeGold = UI_ComCostCurrency.Proxy(_comFosterBottom.m_ComLvConsumeGold);
+            _comStarCousumeGold = UI_ComCostCurrencyWithHas.Proxy(_comFosterBottom.m_comStarCousumeGold);
+
         }
 
 
@@ -144,7 +149,7 @@ namespace GFGGame
         private void UpdateCommon()
         {
             _comFosterBottom.m_listProperty.numItems = _cardData.scores.Count;
-            _comFosterBottom.m_ComLvConsumeGold.m_txtCount.text = "0";
+            _comLvConsumeGold.m_txtNeed.text = "0";
 
         }
         private void UpdateCardRes()
@@ -215,8 +220,8 @@ namespace GFGGame
             _comFosterBottom.m_txtCurLv.text = StringUtil.GetColorText(_showLv.ToString(), _showLv < maxLv ? "#D27869" : "#7D6956");
             _comFosterBottom.m_txtMaxExp.text = cardLvCfg.needExp.ToString();
             _comFosterBottom.m_txtCurExp.text = _showExp.ToString();
-
-            _comFosterBottom.m_btnUpLv.grayed = _comFosterBottom.m_ComLvConsumeGold.m_txtCount.text == "0" ? true : false;
+            //    = "0";
+            _comFosterBottom.m_btnUpLv.grayed = _comLvConsumeGold.m_txtNeed.text == "0" ? true : false;
 
             _comFosterBottom.m_ctrlFullLv.selectedIndex = CardDataManager.isFullLv(_cardData.id, _cardData.lv, false) ? 1 : 0;
 
@@ -378,7 +383,7 @@ namespace GFGGame
                 hasExp += itemCfg.cardUpLvExp * itemsCount[i];
 
             }
-            _comFosterBottom.m_ComLvConsumeGold.m_txtCount.text = count.ToString();
+            _comLvConsumeGold.m_txtNeed.text = count.ToString();
 
             int previewLv = 0;
             int previewExp = 0;
@@ -403,7 +408,7 @@ namespace GFGGame
         private void OnClickBtnUpLv()
         {
             int itemMoneyId = ItemCfgArray.Instance.GetCfg(upgradeCardItemsArr[0]).cardUpLvGoldArr[0];
-            int itemMoneyNum = int.Parse(_comFosterBottom.m_ComLvConsumeGold.m_txtCount.text);
+            int itemMoneyNum = int.Parse(_comLvConsumeGold.m_txtNeed.text);
             if (itemMoneyNum > ItemDataManager.GetItemNum(itemMoneyId))
             {
                 ItemUtil.AddGold(itemMoneyNum - ItemDataManager.GetItemNum(itemMoneyId), UpLv);
@@ -471,7 +476,8 @@ namespace GFGGame
 
                 int costHas = ItemDataManager.GetItemNum(cardStarCfg.costID);
                 int costNeed = cardStarCfg.costNum;
-                _comFosterBottom.m_comStarCousumeGold.m_txtCount.text = string.Format("{0}/{1}", costNeed, costHas);
+                _comStarCousumeGold.m_txtHas.text = costHas.ToString();
+                _comStarCousumeGold.m_txtNeed.text = costNeed.ToString();
 
                 _comFosterBottom.m_listStarConsume.data = cardStarCfg;
                 _comFosterBottom.m_listStarConsume.numItems = cardStarCfg.materiarsArr.Length;

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


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes