浏览代码

工作室道具兑换次数展示

zhaoyang 3 年之前
父节点
当前提交
cf37c1fa84

二进制
FGUIProject/assets/CommonGame/imgItemIcon/fb_gongzuos.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/hd_hdicon_1.png → FGUIProject/assets/CommonGame/imgItemIcon/hd_hdicon_1.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/hd_hdicon_2.png → FGUIProject/assets/CommonGame/imgItemIcon/hd_hdicon_2.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/hd_suanc.png → FGUIProject/assets/CommonGame/imgItemIcon/hd_suanc.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/hongzuan.png → FGUIProject/assets/CommonGame/imgItemIcon/hongzuan.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/huoyuedu.png → FGUIProject/assets/CommonGame/imgItemIcon/huoyuedu.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/jinbi.png → FGUIProject/assets/CommonGame/imgItemIcon/jinbi.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/jinbi_1.png → FGUIProject/assets/CommonGame/imgItemIcon/jinbi_1.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/test.png → FGUIProject/assets/CommonGame/imgItemIcon/test.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/tili.png → FGUIProject/assets/CommonGame/imgItemIcon/tili.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/xingxie.png → FGUIProject/assets/CommonGame/imgItemIcon/xingxie.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/zhuans_1.png → FGUIProject/assets/CommonGame/imgItemIcon/zhuans_1.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/zhuans_2.png → FGUIProject/assets/CommonGame/imgItemIcon/zhuans_2.png


+ 0 - 0
FGUIProject/assets/CommonGame/imagesExport/zizuan.png → FGUIProject/assets/CommonGame/imgItemIcon/zizuan.png


+ 14 - 13
FGUIProject/assets/CommonGame/package.xml

@@ -18,11 +18,11 @@
     <image id="d4iw54" name="zx_bq_shuxing_2.png" path="/imagesExport/" exported="true"/>
     <component id="d4iw55" name="DressUpItemTips.xml" path="/" exported="true"/>
     <image id="d4iw57" name="zx_ditutips_1.png" path="/imagesExport/" exported="true"/>
-    <image id="q08x3" name="jinbi.png" path="/imagesExport/" exported="true"/>
+    <image id="q08x3" name="jinbi.png" path="/imgItemIcon/" exported="true"/>
     <image id="q08x1" name="zjm_jiahao.png" path="/imagesExport/" exported="true"/>
-    <image id="q08x4" name="tili.png" path="/imagesExport/" exported="true"/>
-    <image id="q08x5" name="zhuans_1.png" path="/imagesExport/" exported="true"/>
-    <image id="q08x6" name="zhuans_2.png" path="/imagesExport/" exported="true"/>
+    <image id="q08x4" name="tili.png" path="/imgItemIcon/" exported="true"/>
+    <image id="q08x5" name="zhuans_1.png" path="/imgItemIcon/" exported="true"/>
+    <image id="q08x6" name="zhuans_2.png" path="/imgItemIcon/" exported="true"/>
     <image id="q08x8" name="zjm_gnkuang.png" path="/imagesExport/" exported="true" scale="9grid" scale9grid="37,14,28,28"/>
     <component id="ki9637" name="ButtonPlus1.xml" path="/components/" exported="true"/>
     <component id="v3541v" name="ComponentValueBar.xml" path="/components/" exported="true"/>
@@ -97,16 +97,16 @@
     <image id="wr9a7p" name="kp_jnanniu_1.png" path="/images/" scale="9grid" scale9grid="58,17,116,34"/>
     <image id="lc718g" name="kp_cp_di_2.png" path="/images/" exported="true" scale="9grid" scale9grid="16,37,32,74"/>
     <image id="j539p" name="hc_btkuang.png" path="/images/"/>
-    <image id="vek88h" name="hongzuan.png" path="/imagesExport/" exported="true"/>
-    <image id="vek88i" name="zizuan.png" path="/imagesExport/" exported="true"/>
+    <image id="vek88h" name="hongzuan.png" path="/imgItemIcon/" exported="true"/>
+    <image id="vek88i" name="zizuan.png" path="/imgItemIcon/" exported="true"/>
     <component id="vek88j" name="btnMinus.xml" path="/components/" exported="true"/>
     <component id="wr9a83" name="btnPlus.xml" path="/components/" exported="true"/>
     <image id="vek88k" name="kp_anniu_7.png" path="/images/" exported="true"/>
     <image id="vek88l" name="kp_anniu_8.png" path="/images/" exported="true"/>
-    <image id="ly9g8m" name="xingxie.png" path="/imagesExport/" exported="true"/>
+    <image id="ly9g8m" name="xingxie.png" path="/imgItemIcon/" exported="true"/>
     <image id="ly9g8n" name="luoxings.png" path="/imagesExport/" exported="true"/>
-    <image id="iakb8o" name="hd_hdicon_1.png" path="/imagesExport/" exported="true"/>
-    <image id="iakb8p" name="hd_hdicon_2.png" path="/imagesExport/" exported="true"/>
+    <image id="iakb8o" name="hd_hdicon_1.png" path="/imgItemIcon/" exported="true"/>
+    <image id="iakb8p" name="hd_hdicon_2.png" path="/imgItemIcon/" exported="true"/>
     <component id="m9wm8q" name="RewardUI.xml" path="/" exported="true"/>
     <image id="m9wm8r" name="gxhd_btbt.png" path="/images/"/>
     <image id="m9wm8s" name="gxhd_gd_dik.png" path="/images/"/>
@@ -114,7 +114,7 @@
     <component id="m9wm8u" name="ListRewardItem.xml" path="/components/" exported="true"/>
     <image id="m9wm8v" name="ts_canghaiym.png" path="/imagesExport/" exported="true"/>
     <image id="m9wm8w" name="ts_jiyuet.png" path="/images/"/>
-    <image id="ighs8x" name="hd_suanc.png" path="/imagesExport/" exported="true"/>
+    <image id="ighs8x" name="hd_suanc.png" path="/imgItemIcon/" exported="true"/>
     <image id="9cth8y" name="tctc_xiant_1.png" path="/imagesExport/" exported="true"/>
     <image id="9cth8z" name="cj_hd_kdi.png" path="/imagesExport/"/>
     <image id="9cth90" name="cj_hd_zik.png" path="/imagesExport/"/>
@@ -150,7 +150,7 @@
     <image id="uo1t9o" name="tctc_anniu_2.png" path="/images/"/>
     <component id="ojlzh" name="ComStar.xml" path="/components/" exported="true"/>
     <image id="pzq19p" name="cj_hd_xin.png" path="/imagesExport/"/>
-    <image id="g3nf9q" name="jinbi_1.png" path="/imagesExport/"/>
+    <image id="g3nf9q" name="jinbi_1.png" path="/imgItemIcon/"/>
     <component id="g3nf9r" name="FunctionOpenUI.xml" path="/" exported="true"/>
     <image id="g3nf9t" name="js_icon_.png" path="/imgFunIcon/" exported="true"/>
     <component id="eiwu9v" name="ComFunctionOpen.xml" path="/components/"/>
@@ -183,17 +183,18 @@
     <image id="wet2taf" name="mrqd_bjbj.jpg" path="/bgimg/" exported="true" atlas="alone_npot"/>
     <movieclip id="wet2td7" name="MovieClip2.jta" path="/effect/" atlas="alone_npot"/>
     <component id="kztethp" name="ComListReward.xml" path="/"/>
-    <image id="kztethq" name="test.png" path="/imagesExport/" exported="true"/>
+    <image id="kztethq" name="test.png" path="/imgItemIcon/" exported="true"/>
     <image id="kztethr" name="hyhy_btbt_1.png" path="/imagesExport/" exported="true"/>
     <image id="kzteths" name="gxhd_scjlscjl.png" path="/images/"/>
     <component id="hspqf4" name="ComRedDot.xml" path="/components/" exported="true"/>
     <image id="kjq37" name="gg_gg_hdhdgth.png" path="/imagesExport/" exported="true"/>
     <image id="qr4etht" name="wpzs_anniu_2.png" path="/imagesExport/" exported="true"/>
     <image id="qr4ethu" name="tjtj_bjbj.jpg" path="/bgimg/" exported="true" atlas="alone_npot"/>
-    <image id="a97wthv" name="huoyuedu.png" path="/imagesExport/" exported="true"/>
+    <image id="a97wthv" name="huoyuedu.png" path="/imgItemIcon/" exported="true"/>
     <image id="cs8jthw" name="yx_wilq.png" path="/images/"/>
     <image id="cs8jthx" name="yx_whd.png" path="/images/"/>
     <image id="slyzthy" name="yx_yihd.png" path="/images/"/>
+    <image id="hibuthz" name="fb_gongzuos.png" path="/imgItemIcon/" exported="true"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\CommonGame" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

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

@@ -9,7 +9,7 @@
     <component id="n7_hinb" name="btnExchange" src="q08x6" fileName="components/Button1.xml" pkg="mk0fwx0x" xy="54,420">
       <Button title="兑换"/>
     </component>
-    <component id="n27_n3xh" name="comCostItem" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="100,364"/>
+    <component id="n27_n3xh" name="comCostItem" src="ojlz61" fileName="components/ComCostCurrencyWithHas.xml" pkg="eg2y0ldp" xy="100,364"/>
     <component id="n28_n3xh" name="comCostCurrent" src="n3xha1" fileName="components/ComCostCurrency.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="n29_n3xh" name="txtTips" xy="297,150" pivot="0.5,0" size="342,51" fontSize="38" color="#917961" text="请选择获取次数方式"/>

+ 23 - 0
GameClient/Assets/Game/HotUpdate/Utils/ItemUtil.cs

@@ -1,7 +1,9 @@
 using ET;
+using FairyGUI;
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using UI.CommonGame;
 using UnityEngine;
 
 namespace GFGGame
@@ -218,5 +220,26 @@ namespace GFGGame
             }
             return "png";
         }
+
+        public static void SetItemNumAndNeedNum(GObject obj, int itemId, int needNum, string color = "#D27869")
+        {
+            UI_ComCostCurrencyWithHas com = UI_ComCostCurrencyWithHas.Proxy(obj);
+            int hasNum = ItemDataManager.GetItemNum(itemId);
+            com.m_txtHas.text = StringUtil.GetColorText(hasNum.ToString(), hasNum < needNum ? color : "#FDF3D7"); hasNum.ToString();
+            com.m_txtNeed.text = needNum.ToString();
+
+            ItemCfg cfg1 = ItemCfgArray.Instance.GetCfg(itemId);
+            com.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg1.res);
+
+        }
+        public static void SetItemNeedNum(GObject obj, int itemId, int needNum, string color = "#D27869")
+        {
+            UI_ComCostCurrency com = UI_ComCostCurrency.Proxy(obj);
+            com.m_txtNeed.text = needNum.ToString();
+
+            ItemCfg cfg1 = ItemCfgArray.Instance.GetCfg(itemId);
+            com.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg1.res);
+
+        }
     }
 }

+ 2 - 8
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBuyNumView.cs

@@ -62,17 +62,11 @@ namespace GFGGame
 
 
             _ui.m_txtNum.text = string.Format("(今天已兑换{0}/{1}次)", _studioData.BuyTimes, _studioCfg.buyNum);
-            ItemCfg cfg1 = ItemCfgArray.Instance.GetCfg(_studioCfg.itemID);
-            UI_ComCostCurrency comCostCurrency = UI_ComCostCurrency.Proxy(_ui.m_comCostItem);
-            comCostCurrency.m_txtNeed.text = _studioCfg.itemNum.ToString();
-            comCostCurrency.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg1.res);
 
+            ItemUtil.SetItemNumAndNeedNum(_ui.m_comCostItem, _studioCfg.itemID, _studioCfg.itemNum);
 
-            ItemCfg cfg2 = ItemCfgArray.Instance.GetCfg(_studioCfg.moneyId);
-            UI_ComCostCurrency comCostCurrency2 = UI_ComCostCurrency.Proxy(_ui.m_comCostCurrent);
             StudioCfgArray.Instance.GetMoneyIdAndNum(_studioCfg.id, _studioData.BuyTimes, 1, out int moneyId, out int moneyNum);
-            comCostCurrency2.m_txtNeed.text = moneyNum.ToString();
-            comCostCurrency2.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg2.res);
+            ItemUtil.SetItemNeedNum(_ui.m_comCostCurrent, _studioCfg.moneyId, moneyNum);
 
         }
 

二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes


二进制
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes