Эх сурвалжийг харах

卡牌技能升级时拥有的材料不够时左边为红色

zhaoyang 3 жил өмнө
parent
commit
1833d8b90c

+ 1 - 1
FGUIProject/assets/Card/CardSkillUI.xml

@@ -18,7 +18,7 @@
       <item/>
       <item/>
     </list>
-    <component id="n15_rhha" name="comConsume" src="ojlz61" fileName="components/ComConsumeCurrency.xml" xy="323,856" size="289,42" group="n17_mza1"/>
+    <component id="n15_rhha" name="comConsume" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="323,856" size="289,42" group="n17_mza1"/>
     <component id="n16_rhha" name="btnUpLv" src="842s6q" fileName="components/Button9.xml" pkg="eg2y0ldp" xy="333,920" size="270,74" group="n17_mza1">
       <Button title="升级"/>
     </component>

+ 8 - 8
FGUIProject/assets/Card/components/ComStarConsume.xml

@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="170,175">
   <displayList>
-    <loader id="n35_842s" name="n35" xy="5,15" size="160,160" url="ui://7l6lvkay842s6g" fill="scaleFree"/>
-    <loader id="n36_842s" name="loaItem" xy="29,46" size="112,112" url="ui://eg2y0ldppq5x62" fill="scaleFree">
+    <loader id="n35_842s" name="n35" xy="5,8" size="160,160" url="ui://7l6lvkay842s6g" fill="scaleFree"/>
+    <loader id="n36_842s" name="loaItem" xy="29,39" size="112,112" url="ui://eg2y0ldppq5x62" fill="scaleFree">
       <relation target="" sidePair="center-center,middle-middle"/>
     </loader>
-    <image id="n33_842s" name="n33" src="842s6f" fileName="images/kp_dikuang_4.png" xy="20,146" size="135,30"/>
-    <component id="n34_842s" name="btnPlus" src="wr9a83" fileName="components/btnPlus.xml" pkg="eg2y0ldp" xy="124,136"/>
-    <text id="n39_a713" name="txtHasCount" xy="46,144" size="34,34" group="n42_94m1" fontSize="24" color="#fdf3d7" ubb="true" text="12"/>
-    <text id="n41_wr9a" name="n41" xy="76,144" size="18,34" group="n42_94m1" fontSize="24" color="#fff8ea" text="/"/>
-    <text id="n38_a713" name="txtNeedCount" xy="90,144" size="34,34" group="n42_94m1" fontSize="24" color="#fdf3d7" ubb="true" text="66"/>
-    <group id="n42_94m1" name="n42" xy="46,144" size="78,34" advanced="true" layout="hz" colGap="-4" excludeInvisibles="true">
+    <image id="n33_842s" name="n33" src="842s6f" fileName="images/kp_dikuang_4.png" xy="20,139" size="135,30"/>
+    <component id="n34_842s" name="btnPlus" src="wr9a83" fileName="components/btnPlus.xml" pkg="eg2y0ldp" xy="124,129"/>
+    <text id="n39_a713" name="txtHasCount" xy="46,137" size="34,34" group="n42_94m1" fontSize="24" color="#fdf3d7" ubb="true" text="12"/>
+    <text id="n41_wr9a" name="n41" xy="76,137" size="18,34" group="n42_94m1" fontSize="24" color="#fff8ea" text="/"/>
+    <text id="n38_a713" name="txtNeedCount" xy="90,137" size="34,34" group="n42_94m1" fontSize="24" color="#fdf3d7" ubb="true" text="66"/>
+    <group id="n42_94m1" name="n42" xy="46,137" size="78,34" advanced="true" layout="hz" colGap="-4" excludeInvisibles="true">
       <relation target="" sidePair="center-center"/>
     </group>
   </displayList>

+ 2 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_CardSkillUI.cs

@@ -13,7 +13,7 @@ namespace UI.Card
         public UI_ComSkillDiscribe m_comCurLV;
         public UI_ComSkillDiscribe m_comNextLv;
         public GList m_listConsume;
-        public UI_ComConsumeCurrency m_comConsume;
+        public GComponent m_comConsume;
         public GButton m_btnUpLv;
         public const string URL = "ui://7l6lvkayrhha9m";
         public const string PACKAGE_NAME = "Card";
@@ -68,7 +68,7 @@ namespace UI.Card
             m_comCurLV = (UI_ComSkillDiscribe)UI_ComSkillDiscribe.Create(comp.GetChild("comCurLV"));
             m_comNextLv = (UI_ComSkillDiscribe)UI_ComSkillDiscribe.Create(comp.GetChild("comNextLv"));
             m_listConsume = (GList)comp.GetChild("listConsume");
-            m_comConsume = (UI_ComConsumeCurrency)UI_ComConsumeCurrency.Create(comp.GetChild("comConsume"));
+            m_comConsume = (GComponent)comp.GetChild("comConsume");
             m_btnUpLv = (GButton)comp.GetChild("btnUpLv");
         }
         public void Dispose(bool disposeTarget = false)
@@ -82,7 +82,6 @@ namespace UI.Card
             m_comNextLv.Dispose();
             m_comNextLv = null;
             m_listConsume = null;
-            m_comConsume.Dispose();
             m_comConsume = null;
             m_btnUpLv = null;
             if(disposeTarget && target != null)

+ 0 - 74
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_ComConsumeCurrency.cs

@@ -1,74 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.Card
-{
-    public partial class UI_ComConsumeCurrency
-    {
-        public GComponent target;
-        public GLoader m_loaIcon;
-        public GTextField m_txtCount;
-        public const string URL = "ui://7l6lvkayojlz61";
-        public const string PACKAGE_NAME = "Card";
-        public const string RES_NAME = "ComConsumeCurrency";
-        private static UI_ComConsumeCurrency _proxy;
-
-        public static UI_ComConsumeCurrency Create(GObject gObject = null)
-        {
-            var ui = new UI_ComConsumeCurrency();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_ComConsumeCurrency Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComConsumeCurrency();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_loaIcon = (GLoader)comp.GetChild("loaIcon");
-            m_txtCount = (GTextField)comp.GetChild("txtCount");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_loaIcon = null;
-            m_txtCount = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Card/UI_ComConsumeCurrency.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 4e7ebca27c691d34f81ad7ad14623f4a
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 5 - 4
GameClient/Assets/Game/HotUpdate/Views/Card/CardSkillView.cs

@@ -1,6 +1,7 @@
 using ET;
 using FairyGUI;
 using UI.Card;
+using UI.CommonGame;
 namespace GFGGame
 {
     public class CardSkillView : BaseWindow
@@ -62,8 +63,8 @@ namespace GFGGame
                 _ui.m_c1.selectedIndex = 1;
                 return;
             }
-
-            _ui.m_comConsume.m_txtCount.text = skillLvCfg.costNum.ToString();
+            UI_ComCostCurrency costCurrency = UI_ComCostCurrency.Proxy(_ui.m_comConsume);
+            costCurrency.m_txtNeed.text = skillLvCfg.costNum.ToString();
             UpdateComLv(_ui.m_comNextLv, skillLv + 1, "下一级");
             _ui.m_listConsume.numItems = skillLvCfg.materiarsArr.Length;
 
@@ -87,8 +88,8 @@ namespace GFGGame
 
             int needCount = skillLvCfg.materiarsArr[index][1];
             int hasCount = ItemDataManager.GetItemNum(skillLvCfg.materiarsArr[index][0]);
-            listItem.m_txtNeedCount.text = StringUtil.GetColorText(needCount.ToString(), hasCount < needCount ? "#FCBCBA" : "#FFF8EA"); ;
-            listItem.m_txtHasCount.text = hasCount.ToString();
+            listItem.m_txtNeedCount.text = needCount.ToString();
+            listItem.m_txtHasCount.text = StringUtil.GetColorText(hasCount.ToString(), hasCount < needCount ? "#D27869" : "#FDF3D7"); ;
             listItem.m_btnPlus.visible = false;
             if (listItem.m_btnPlus.data == null)
             {

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