Bläddra i källkod

工作的道具购买界面ui优化

zhaoyang 2 år sedan
förälder
incheckning
8f513996ff

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

@@ -4,9 +4,6 @@
     <image id="n4_a713" name="n4" src="a71377" fileName="imagesExport/kp_dikuang_3.png" xy="60,3" size="247,36"/>
     <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="n7_j5a5" name="txtHas" xy="142,0" size="91,39" group="n9_l4ui" fontSize="28" color="#ffffff" align="center" vAlign="middle" ubb="true" autoClearText="true" text="10000"/>
-    <text id="n8_j5a5" name="txtLine" xy="233,1" size="21,39" group="n9_l4ui" fontSize="28" color="#ffffff" text="/"/>
-    <text id="n6_j5a5" name="txtNeed" xy="254,1" size="56,39" group="n9_l4ui" fontSize="28" color="#ffffff" align="center" vAlign="middle" ubb="true" autoClearText="true" text="999"/>
-    <group id="n9_l4ui" name="n9" xy="142,0" size="168,40" advanced="true" layout="hz" excludeInvisibles="true"/>
+    <text id="n11_r9ri" name="txtCount" xy="147,0" pivot="0.5,0" size="125,39" fontSize="28" color="#ffffff" align="center" vAlign="middle" ubb="true" autoClearText="true" text="999/999"/>
   </displayList>
 </component>

+ 3 - 3
FGUIProject/assets/Studio/StudioBuyNumUI.xml

@@ -6,13 +6,13 @@
     <component id="n6_hinb" name="btnBuy" src="q08x7" fileName="components/Button2.xml" pkg="mk0fwx0x" xy="496,419">
       <Button title="购买"/>
     </component>
-    <component id="n7_hinb" name="btnExchange" src="q08x6" fileName="components/Button1.xml" pkg="mk0fwx0x" xy="54,420">
+    <component id="n7_hinb" name="btnExchange" src="q08x6" fileName="components/Button1.xml" pkg="mk0fwx0x" xy="55,420">
       <Button title="兑换"/>
     </component>
     <component id="n27_n3xh" name="comCostItem" src="ojlz61" fileName="components/ComCostCurrencyWithHas.xml" pkg="eg2y0ldp" xy="100,364"/>
     <component id="n28_n3xh" name="comCostCurrent" src="ojlz61" fileName="components/ComCostCurrencyWithHas.xml" pkg="eg2y0ldp" xy="540,364"/>
-    <text id="n30_n3xh" name="txtTitle" xy="425,30" pivot="0.5,0" size="100,64" fontSize="48" color="#9b7853" text="提示"/>
+    <text id="n30_n3xh" name="txtTitle" xy="418,30" pivot="0.5,0" size="100,64" fontSize="48" color="#9b7853" text="提示"/>
     <text id="n29_n3xh" name="txtTips" xy="297,150" pivot="0.5,0" size="342,51" fontSize="38" color="#917961" text="请选择获取次数方式"/>
-    <text id="n31_n3xh" name="txtNum" xy="337,220" pivot="0.5,0" size="294,44" fontSize="32" color="#917961" text="(今日已兑换0/10次)"/>
+    <text id="n31_n3xh" name="txtNum" xy="321,220" pivot="0.5,0" size="294,44" fontSize="32" color="#917961" text="(今日已兑换0/10次)"/>
   </displayList>
 </component>

+ 1 - 1
FGUIProject/assets/Studio/StudioFilingUI.xml

@@ -22,7 +22,7 @@
       <item/>
       <item/>
     </list>
-    <component id="n3_rqo4" name="btnReward" src="rqo41m" fileName="components/Button2.xml" xy="896,1753">
+    <component id="n3_rqo4" name="btnReward" src="rqo41m" fileName="components/Button2.xml" xy="896,1743">
       <relation target="" sidePair="right-right,bottom-bottom"/>
     </component>
     <component id="n4_rqo4" name="btnSuit" src="rqo41n" fileName="components/Button3.xml" xy="0,1734" group="n20_rqo4"/>

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

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

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Utils/ItemUtil.cs

@@ -225,9 +225,9 @@ namespace GFGGame
         {
             UI_ComCostCurrencyWithHas com = UI_ComCostCurrencyWithHas.Proxy(obj);
             int hasNum = ItemDataManager.GetItemNum(itemId);
-            com.m_txtHas.text = StringUtil.GetColorText(NumberUtil.ChangeNumberUnit(hasNum), hasNum < needNum ? color : "#FFFFFF"); hasNum.ToString();
-            com.m_txtNeed.text = needNum.ToString();
-
+            string strHasNum = StringUtil.GetColorText(hasNum.ToString(), hasNum < needNum ? color : "#FFFFFF"); hasNum.ToString();
+            // com.m_txtNeed.text = needNum.ToString();
+            com.m_txtCount.text = string.Format("{0}/{1}", strHasNum, needNum);
             ItemCfg cfg1 = ItemCfgArray.Instance.GetCfg(itemId);
             com.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg1.res);
 

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

@@ -495,13 +495,8 @@ namespace GFGGame
 
                 _comFosterBottom.m_btnUpStar.data = 0;//data  0:可以升级,1:材料不足
 
-                // int costHas = ItemDataManager.GetItemNum(cardStarCfg.costID);
-                // int costNeed = cardStarCfg.costNum;
-                // _comStarCousumeGold.m_txtHas.text = costHas.ToString();
-                // _comStarCousumeGold.m_txtNeed.text = costNeed.ToString();
-                _comStarCousumeGold = UI_ComCostCurrencyWithHas.Proxy(_comFosterBottom.m_comStarCousumeGold);
-                ItemUtil.SetItemNumAndNeedNum(_comStarCousumeGold.target, cardStarCfg.costID, cardStarCfg.costNum);
-                UI_ComCostCurrencyWithHas.ProxyEnd();
+                ItemUtil.SetItemNumAndNeedNum(_comFosterBottom.m_comStarCousumeGold, cardStarCfg.costID, cardStarCfg.costNum);
+
                 _comFosterBottom.m_listStarConsume.data = cardStarCfg;
                 _comFosterBottom.m_listStarConsume.numItems = cardStarCfg.materiarsArr.Length;
 

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


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes