浏览代码

商城道具兑换替换ui

zhaoyang 2 年之前
父节点
当前提交
2e38c8ffb6
共有 38 个文件被更改,包括 128 次插入113 次删除
  1. 1 1
      FGUIProject/assets/Bag/components/ListItem.xml
  2. 二进制
      FGUIProject/assets/Bag/imgnew/tc_kuangk.png
  3. 二进制
      FGUIProject/assets/Bag/imgnew/tc_xiant.png
  4. 二进制
      FGUIProject/assets/Bag/imgnew/tc_zszs.png
  5. 0 17
      FGUIProject/assets/Bag/package.xml
  6. 16 13
      FGUIProject/assets/CommonGame/ItemExchangeUI.xml
  7. 1 1
      FGUIProject/assets/CommonGame/components/Button1.xml
  8. 2 2
      FGUIProject/assets/CommonGame/components/Button16.xml
  9. 2 2
      FGUIProject/assets/CommonGame/components/Button2.xml
  10. 2 2
      FGUIProject/assets/CommonGame/components/Button3.xml
  11. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_anniu_qd.png
  12. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_anniu_qx.png
  13. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_tyjia_1.png
  14. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_tyjia_2.png
  15. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_tyjian_1.png
  16. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_tyjian_2.png
  17. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_tyjjdi.png
  18. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_tyzd_1.png
  19. 0 0
      FGUIProject/assets/CommonGame/imgnew/tc_tyzd_2.png
  20. 14 0
      FGUIProject/assets/CommonGame/package.xml
  21. 10 10
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button16.cs
  22. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button16.cs.meta
  23. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button2.cs
  24. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button2.cs.meta
  25. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button3.cs
  26. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button3.cs.meta
  27. 18 14
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ItemExchangeUI.cs
  28. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ItemExchangeUI.cs.meta
  29. 4 4
      GameClient/Assets/Game/HotUpdate/Utils/ItemUtil.cs
  30. 5 4
      GameClient/Assets/Game/HotUpdate/Views/Bag/BagExchangeView.cs
  31. 43 33
      GameClient/Assets/Game/HotUpdate/Views/RechargeStore/ItemExchangeView.cs
  32. 二进制
      GameClient/Assets/ResIn/UI/Bag/Bag_atlas0.png
  33. 二进制
      GameClient/Assets/ResIn/UI/Bag/Bag_fui.bytes
  34. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png
  35. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png
  36. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png
  37. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png
  38. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes

+ 1 - 1
FGUIProject/assets/Bag/components/ListItem.xml

@@ -3,6 +3,6 @@
   <displayList>
     <image id="n18_si5z" name="n18" src="si5zti4" fileName="images/wpbb_di.png" xy="0,0"/>
     <loader id="n19_si5z" name="loaIcon" xy="41,42" pivot="0.5,0.5" size="138,138" aspect="true" fill="scale"/>
-    <text id="n20_si5z" name="txtCount" xy="135,166" pivot="1,0" size="69,49" fontSize="36" color="#fbf6eb" vars="true" strokeColor="#5c4e3f" strokeSize="2" text="x{count=20}"/>
+    <text id="n20_si5z" name="txtCount" xy="133,166" pivot="1,0" size="69,49" fontSize="36" color="#fbf6eb" vars="true" strokeColor="#5c4e3f" strokeSize="2" text="x{count=20}"/>
   </displayList>
 </component>

二进制
FGUIProject/assets/Bag/imgnew/tc_kuangk.png


二进制
FGUIProject/assets/Bag/imgnew/tc_xiant.png


二进制
FGUIProject/assets/Bag/imgnew/tc_zszs.png


+ 0 - 17
FGUIProject/assets/Bag/package.xml

@@ -6,23 +6,6 @@
     <image id="si5zti4" name="wpbb_di.png" path="/images/"/>
     <image id="si5zti6" name="wpbb_xtxt.png" path="/images/"/>
     <component id="si5zti7" name="ListItem.xml" path="/components/"/>
-    <component id="si5zti8" name="BagExchangeUI.xml" path="/" exported="true"/>
-    <image id="si5ztia" name="tc_xiant.png" path="/imgnew/"/>
-    <image id="si5ztib" name="tc_kuangk.png" path="/imgnew/"/>
-    <image id="si5ztic" name="tc_zszs.png" path="/imgnew/" scale="9grid" scale9grid="374,2,104,6"/>
-    <image id="si5ztid" name="tc_tyzd_2.png" path="/images/"/>
-    <image id="si5ztie" name="tc_anniu_qd.png" path="/images/"/>
-    <image id="si5ztif" name="tc_anniu_qx.png" path="/images/"/>
-    <image id="si5ztig" name="tc_tyjia_1.png" path="/images/"/>
-    <image id="si5ztih" name="tc_tyjia_2.png" path="/images/"/>
-    <image id="si5ztii" name="tc_tyjian_1.png" path="/images/"/>
-    <image id="si5ztij" name="tc_tyjian_2.png" path="/images/"/>
-    <image id="si5ztik" name="tc_tyjjdi.png" path="/images/"/>
-    <image id="si5ztil" name="tc_tyzd_1.png" path="/images/"/>
-    <component id="si5ztim" name="Button1.xml" path="/components/"/>
-    <component id="si5ztin" name="Button2.xml" path="/components/"/>
-    <component id="si5ztio" name="Button3.xml" path="/components/"/>
-    <component id="si5ztip" name="Button4.xml" path="/components/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\Bag" packageCount="2" genCode="true"/>
 </packageDescription>

+ 16 - 13
FGUIProject/assets/Bag/BagExchangeUI.xml → FGUIProject/assets/CommonGame/ItemExchangeUI.xml

@@ -1,37 +1,40 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="962,1019">
   <displayList>
-    <component id="n0_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" pkg="eg2y0ldp" xy="0,-11" size="962,1041">
+    <component id="n0_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" xy="0,-11" size="962,1041">
       <relation target="" sidePair="height-height"/>
     </component>
     <text id="n5_si5z" name="txtName" xy="65,58" size="186,61" group="n12_si5z" fontSize="46" color="#8a7253" autoClearText="true" text="物品名字"/>
     <text id="n6_si5z" name="txtOwned" xy="742,80" pivot="1,0" size="139,41" group="n12_si5z" fontSize="30" color="#90877f" vars="true" text="已拥有:{count=20}"/>
-    <image id="n7_si5z" name="n7" src="si5ztia" fileName="imgnew/tc_xiant.png" xy="56,130" group="n12_si5z"/>
+    <image id="n7_si5z" name="n7" src="si5ztig" fileName="imgnew/tc_xiant.png" xy="56,130" group="n12_si5z"/>
     <loader id="n8_si5z" name="loaRarity" xy="40,164" size="44,94" group="n12_si5z" url="ui://eg2y0ldpd4iw4z" autoSize="true"/>
     <loader id="n9_si5z" name="loaIcon" xy="165,253" pivot="0.5,0.5" anchor="true" size="200,200" group="n12_si5z" aspect="true" autoSize="true"/>
-    <image id="n10_si5z" name="n10" src="si5ztib" fileName="imgnew/tc_kuangk.png" xy="357,167" group="n12_si5z"/>
+    <image id="n10_si5z" name="n10" src="si5ztia" fileName="imgnew/tc_kuangk.png" xy="357,167" group="n12_si5z"/>
     <text id="n11_si5z" name="txtDesc" xy="375,189" size="506,166" group="n12_si5z" fontSize="30" color="#998a79" ubb="true" autoSize="none" autoClearText="true" text="手机课程很快就要开课咯!!同学们有没有很期待哇过 几天课上见昂!!28节课希望大家都可以跟下来一起度 过有趣儿的两个月吧。"/>
+    <text id="n28_s5s9" name="txtExchangeCount" xy="230,314" pivot="1,0" size="69,49" group="n12_si5z" fontSize="36" color="#fbf6eb" vars="true" strokeColor="#5c4e3f" strokeSize="2" text="x{count=20}"/>
     <group id="n12_si5z" name="n12" xy="40,58" size="866,313"/>
-    <image id="n2_si5z" name="n2" src="si5ztic" fileName="imgnew/tc_zszs.png" xy="32,474" size="897,15" group="n4_si5z"/>
+    <image id="n2_si5z" name="n2" src="si5zti8" fileName="imgnew/tc_zszs.png" xy="32,474" size="897,15" group="n4_si5z"/>
     <text id="n3_si5z" name="n3" xy="359,452" size="244,54" group="n4_si5z" fontSize="40" color="#8a7253" text="选择使用数量"/>
     <group id="n4_si5z" name="n4" xy="32,452" size="897,54"/>
-    <image id="n13_si5z" name="n13" src="si5ztik" fileName="images/tc_tyjjdi.png" xy="197,582" group="n19_si5z"/>
+    <image id="n13_si5z" name="n13" src="si5ztik" fileName="imgnew/tc_tyjjdi.png" xy="197,582" group="n19_si5z"/>
     <component id="n17_si5z" name="btnMinus" src="si5ztin" fileName="components/Button2.xml" xy="175,580" group="n19_si5z">
-      <Button icon="ui://2bsz6nelsi5ztii"/>
+      <Button icon="ui://eg2y0ldps5s9tip"/>
     </component>
-    <component id="n16_si5z" name="btnAdd" src="si5ztip" fileName="components/Button4.xml" xy="490,581" group="n19_si5z"/>
+    <component id="n16_si5z" name="btnAdd" src="si5ztip" fileName="components/Button16.xml" xy="490,581" group="n19_si5z"/>
     <component id="n18_si5z" name="btnMax" src="si5ztio" fileName="components/Button3.xml" xy="597,579" group="n19_si5z">
-      <Button icon="ui://2bsz6nelsi5ztil"/>
+      <Button icon="ui://eg2y0ldpsi5ztil"/>
     </component>
     <text id="n22_si5z" name="txtCostCount" xy="338,587" pivot="0.5,0" size="54,54" group="n19_si5z" fontSize="40" color="#816e57" text="50"/>
     <group id="n19_si5z" name="n19" xy="175,579" size="612,70"/>
-    <component id="n14_si5z" name="btnCancle" src="si5ztim" fileName="components/Button1.xml" xy="124,882" group="n20_si5z"/>
-    <component id="n15_si5z" name="btnConfirm" src="si5ztim" fileName="components/Button1.xml" xy="544,882" group="n20_si5z">
-      <Button icon="ui://2bsz6nelsi5ztie"/>
+    <component id="n14_si5z" name="btnCancle" src="si5ztim" fileName="components/Button1.xml" xy="124,882" group="n20_si5z">
+      <Button icon="ui://eg2y0ldps5s9tim"/>
+    </component>
+    <component id="n15_si5z" name="btnConfirm" src="si5ztim" fileName="components/Button1.xml" xy="544,882" size="294,89" group="n20_si5z">
+      <Button icon="ui://eg2y0ldps5s9til"/>
     </component>
     <group id="n20_si5z" name="n20" xy="124,882" size="714,89"/>
-    <text id="n24_si5z" name="txtTips" xy="317,700" pivot="0.5,0" size="328,52" group="n26_si5z" fontSize="38" color="#8e7c6b" align="center" text="是否使用1个道具?"/>
-    <component id="n25_si5z" name="comCost" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="359,792" pivot="0.5,0" group="n26_si5z"/>
+    <text id="n24_si5z" name="txtTips" xy="317,700" pivot="0.5,0" size="328,51" group="n26_si5z" fontSize="38" color="#8e7c6b" align="center" text="是否使用1个道具?"/>
+    <component id="n25_si5z" name="comCost" src="n3xha1" fileName="components/ComCostCurrency.xml" xy="359,792" pivot="0.5,0" group="n26_si5z"/>
     <group id="n26_si5z" name="n26" xy="317,700" size="328,138" advanced="true" layout="vt" lineGap="40" excludeInvisibles="true">
       <relation target="" sidePair="middle-middle"/>
     </group>

+ 1 - 1
FGUIProject/assets/Bag/components/Button1.xml → FGUIProject/assets/CommonGame/components/Button1.xml

@@ -2,7 +2,7 @@
 <component size="294,89" extention="Button">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
-    <loader id="n1_si5z" name="icon" xy="0,0" size="294,89" url="ui://2bsz6nelsi5ztif" autoSize="true"/>
+    <loader id="n1_si5z" name="icon" xy="0,0" size="294,89" url="ui://eg2y0ldps5s9tim" autoSize="true"/>
   </displayList>
   <Button/>
 </component>

+ 2 - 2
FGUIProject/assets/Bag/components/Button4.xml → FGUIProject/assets/CommonGame/components/Button16.xml

@@ -3,8 +3,8 @@
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
-    <loader id="n1_si5z" name="icon" xy="0,0" size="73,72" url="ui://2bsz6nelsi5ztih" autoSize="true">
-      <gearIcon controller="c1" pages="1" values="ui://2bsz6nelsi5ztih" default="ui://2bsz6nelsi5ztig"/>
+    <loader id="n1_si5z" name="icon" xy="0,0" size="73,72" url="ui://eg2y0ldps5s9tio" autoSize="true">
+      <gearIcon controller="c1" pages="1" values="ui://eg2y0ldps5s9tio" default="ui://eg2y0ldps5s9tin"/>
     </loader>
   </displayList>
   <Button/>

+ 2 - 2
FGUIProject/assets/Bag/components/Button2.xml → FGUIProject/assets/CommonGame/components/Button2.xml

@@ -3,8 +3,8 @@
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
-    <loader id="n1_si5z" name="icon" xy="0,0" size="68,68" url="ui://2bsz6nelsi5ztii" autoSize="true">
-      <gearIcon controller="c1" pages="0,1" values="ui://2bsz6nelsi5ztii|ui://2bsz6nelsi5ztij"/>
+    <loader id="n1_si5z" name="icon" xy="0,0" size="68,68" url="ui://eg2y0ldps5s9tip" autoSize="true">
+      <gearIcon controller="c1" pages="0,1" values="ui://eg2y0ldps5s9tip|ui://eg2y0ldpsi5ztij"/>
     </loader>
   </displayList>
   <Button/>

+ 2 - 2
FGUIProject/assets/Bag/components/Button3.xml → FGUIProject/assets/CommonGame/components/Button3.xml

@@ -3,8 +3,8 @@
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
-    <loader id="n1_si5z" name="icon" xy="2,2" size="190,68" url="ui://2bsz6nelsi5ztid" autoSize="true">
-      <gearIcon controller="c1" pages="1" values="ui://2bsz6nelsi5ztid" default="ui://2bsz6nelsi5ztil"/>
+    <loader id="n1_si5z" name="icon" xy="2,2" size="190,68" url="ui://eg2y0ldps5s9tiq" autoSize="true">
+      <gearIcon controller="c1" pages="1" values="ui://eg2y0ldps5s9tiq" default="ui://eg2y0ldpsi5ztil"/>
     </loader>
   </displayList>
   <Button/>

+ 0 - 0
FGUIProject/assets/Bag/images/tc_anniu_qd.png → FGUIProject/assets/CommonGame/imgnew/tc_anniu_qd.png


+ 0 - 0
FGUIProject/assets/Bag/images/tc_anniu_qx.png → FGUIProject/assets/CommonGame/imgnew/tc_anniu_qx.png


+ 0 - 0
FGUIProject/assets/Bag/images/tc_tyjia_1.png → FGUIProject/assets/CommonGame/imgnew/tc_tyjia_1.png


+ 0 - 0
FGUIProject/assets/Bag/images/tc_tyjia_2.png → FGUIProject/assets/CommonGame/imgnew/tc_tyjia_2.png


+ 0 - 0
FGUIProject/assets/Bag/images/tc_tyjian_1.png → FGUIProject/assets/CommonGame/imgnew/tc_tyjian_1.png


+ 0 - 0
FGUIProject/assets/Bag/images/tc_tyjian_2.png → FGUIProject/assets/CommonGame/imgnew/tc_tyjian_2.png


+ 0 - 0
FGUIProject/assets/Bag/images/tc_tyjjdi.png → FGUIProject/assets/CommonGame/imgnew/tc_tyjjdi.png


+ 0 - 0
FGUIProject/assets/Bag/images/tc_tyzd_1.png → FGUIProject/assets/CommonGame/imgnew/tc_tyzd_1.png


+ 0 - 0
FGUIProject/assets/Bag/images/tc_tyzd_2.png → FGUIProject/assets/CommonGame/imgnew/tc_tyzd_2.png


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

@@ -208,6 +208,20 @@
     <component id="si5ztih" name="ComBg.xml" path="/components/" exported="true"/>
     <image id="si5ztii" name="tc_txbiao_1.png" path="/imgFunIcon/" exported="true"/>
     <image id="s5s9tij" name="js_icon_.png" path="/imgFunIcon/"/>
+    <component id="s5s9tik" name="ItemExchangeUI.xml" path="/" exported="true"/>
+    <image id="s5s9til" name="tc_anniu_qd.png" path="/imgnew/"/>
+    <image id="s5s9tim" name="tc_anniu_qx.png" path="/imgnew/"/>
+    <image id="s5s9tin" name="tc_tyjia_1.png" path="/imgnew/"/>
+    <image id="s5s9tio" name="tc_tyjia_2.png" path="/imgnew/"/>
+    <image id="s5s9tip" name="tc_tyjian_1.png" path="/imgnew/"/>
+    <image id="si5ztij" name="tc_tyjian_2.png" path="/imgnew/"/>
+    <image id="si5ztik" name="tc_tyjjdi.png" path="/imgnew/"/>
+    <image id="si5ztil" name="tc_tyzd_1.png" path="/imgnew/"/>
+    <image id="s5s9tiq" name="tc_tyzd_2.png" path="/imgnew/"/>
+    <component id="si5ztim" name="Button1.xml" path="/components/"/>
+    <component id="si5ztin" name="Button2.xml" path="/components/"/>
+    <component id="si5ztio" name="Button3.xml" path="/components/"/>
+    <component id="si5ztip" name="Button16.xml" path="/components/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\CommonGame" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 10 - 10
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_Button4.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button16.cs

@@ -2,20 +2,20 @@
 
 using FairyGUI;
 
-namespace UI.Bag
+namespace UI.CommonGame
 {
-    public partial class UI_Button4
+    public partial class UI_Button16
     {
         public GButton target;
         public Controller m_c1;
-        public const string URL = "ui://2bsz6nelsi5ztip";
-        public const string PACKAGE_NAME = "Bag";
-        public const string RES_NAME = "Button4";
-        private static UI_Button4 _proxy;
+        public const string URL = "ui://eg2y0ldpsi5ztip";
+        public const string PACKAGE_NAME = "CommonGame";
+        public const string RES_NAME = "Button16";
+        private static UI_Button16 _proxy;
 
-        public static UI_Button4 Create(GObject gObject = null)
+        public static UI_Button16 Create(GObject gObject = null)
         {
-            var ui = new UI_Button4();
+            var ui = new UI_Button16();
             if(gObject == null)
             	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
@@ -24,11 +24,11 @@ namespace UI.Bag
             return ui;
         }
 
-        public static UI_Button4 Proxy(GObject gObject = null)
+        public static UI_Button16 Proxy(GObject gObject = null)
         {
             if(_proxy == null)
             {
-                _proxy = new UI_Button4();
+                _proxy = new UI_Button16();
             }
             var ui = _proxy;
             if(gObject == null)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_BagExchangeUI.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button16.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 334db0b6c99615349b0303a89993d2ef
+guid: 258cae7edd0a74d4d95d7d093b181eef
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_Button2.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button2.cs

@@ -2,14 +2,14 @@
 
 using FairyGUI;
 
-namespace UI.Bag
+namespace UI.CommonGame
 {
     public partial class UI_Button2
     {
         public GButton target;
         public Controller m_c1;
-        public const string URL = "ui://2bsz6nelsi5ztin";
-        public const string PACKAGE_NAME = "Bag";
+        public const string URL = "ui://eg2y0ldpsi5ztin";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "Button2";
         private static UI_Button2 _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_Button2.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button2.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e3bea0b0716fd0641893f728ceb4008e
+guid: fc0e8f98ec418cb4883e305104eef2c3
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_Button3.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button3.cs

@@ -2,14 +2,14 @@
 
 using FairyGUI;
 
-namespace UI.Bag
+namespace UI.CommonGame
 {
     public partial class UI_Button3
     {
         public GButton target;
         public Controller m_c1;
-        public const string URL = "ui://2bsz6nelsi5ztio";
-        public const string PACKAGE_NAME = "Bag";
+        public const string URL = "ui://eg2y0ldpsi5ztio";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "Button3";
         private static UI_Button3 _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_Button3.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Button3.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: eed671876ac8ec34e81e4e8750ebedf8
+guid: 5d12dd31fe7c8a44da2b7e3593333fd4
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 18 - 14
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_BagExchangeUI.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ItemExchangeUI.cs

@@ -2,9 +2,9 @@
 
 using FairyGUI;
 
-namespace UI.Bag
+namespace UI.CommonGame
 {
-    public partial class UI_BagExchangeUI
+    public partial class UI_ItemExchangeUI
     {
         public GComponent target;
         public GComponent m_comBg;
@@ -13,22 +13,23 @@ namespace UI.Bag
         public GLoader m_loaRarity;
         public GLoader m_loaIcon;
         public GTextField m_txtDesc;
+        public GTextField m_txtExchangeCount;
         public UI_Button2 m_btnMinus;
-        public UI_Button4 m_btnAdd;
+        public UI_Button16 m_btnAdd;
         public UI_Button3 m_btnMax;
         public GTextField m_txtCostCount;
         public GButton m_btnCancle;
         public GButton m_btnConfirm;
         public GTextField m_txtTips;
-        public GComponent m_comCost;
-        public const string URL = "ui://2bsz6nelsi5zti8";
-        public const string PACKAGE_NAME = "Bag";
-        public const string RES_NAME = "BagExchangeUI";
-        private static UI_BagExchangeUI _proxy;
+        public UI_ComCostCurrency m_comCost;
+        public const string URL = "ui://eg2y0ldps5s9tik";
+        public const string PACKAGE_NAME = "CommonGame";
+        public const string RES_NAME = "ItemExchangeUI";
+        private static UI_ItemExchangeUI _proxy;
 
-        public static UI_BagExchangeUI Create(GObject gObject = null)
+        public static UI_ItemExchangeUI Create(GObject gObject = null)
         {
-            var ui = new UI_BagExchangeUI();
+            var ui = new UI_ItemExchangeUI();
             if(gObject == null)
             	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
@@ -37,11 +38,11 @@ namespace UI.Bag
             return ui;
         }
 
-        public static UI_BagExchangeUI Proxy(GObject gObject = null)
+        public static UI_ItemExchangeUI Proxy(GObject gObject = null)
         {
             if(_proxy == null)
             {
-                _proxy = new UI_BagExchangeUI();
+                _proxy = new UI_ItemExchangeUI();
             }
             var ui = _proxy;
             if(gObject == null)
@@ -74,14 +75,15 @@ namespace UI.Bag
             m_loaRarity = (GLoader)comp.GetChild("loaRarity");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_txtDesc = (GTextField)comp.GetChild("txtDesc");
+            m_txtExchangeCount = (GTextField)comp.GetChild("txtExchangeCount");
             m_btnMinus = (UI_Button2)UI_Button2.Create(comp.GetChild("btnMinus"));
-            m_btnAdd = (UI_Button4)UI_Button4.Create(comp.GetChild("btnAdd"));
+            m_btnAdd = (UI_Button16)UI_Button16.Create(comp.GetChild("btnAdd"));
             m_btnMax = (UI_Button3)UI_Button3.Create(comp.GetChild("btnMax"));
             m_txtCostCount = (GTextField)comp.GetChild("txtCostCount");
             m_btnCancle = (GButton)comp.GetChild("btnCancle");
             m_btnConfirm = (GButton)comp.GetChild("btnConfirm");
             m_txtTips = (GTextField)comp.GetChild("txtTips");
-            m_comCost = (GComponent)comp.GetChild("comCost");
+            m_comCost = (UI_ComCostCurrency)UI_ComCostCurrency.Create(comp.GetChild("comCost"));
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -91,6 +93,7 @@ namespace UI.Bag
             m_loaRarity = null;
             m_loaIcon = null;
             m_txtDesc = null;
+            m_txtExchangeCount = null;
             m_btnMinus.Dispose();
             m_btnMinus = null;
             m_btnAdd.Dispose();
@@ -101,6 +104,7 @@ namespace UI.Bag
             m_btnCancle = null;
             m_btnConfirm = null;
             m_txtTips = null;
+            m_comCost.Dispose();
             m_comCost = null;
             if(disposeTarget && target != null)
             {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_Button4.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ItemExchangeUI.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 0ce1537f75e2949419a2fabdb682c465
+guid: b8918c66e4a95fe4cb79b55034b1d92e
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

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

@@ -232,14 +232,14 @@ namespace GFGGame
             com.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg1.res);
 
         }
-        public static void SetItemNeedNum(GObject obj, int itemId, int needNum, string color = "#D27869")
+        public static void SetItemNeedNum(GObject obj, int itemId, int needNum)
         {
             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);
-
+            ItemCfg cfg = ItemCfgArray.Instance.GetCfg(itemId);
+            com.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg.res);
+            UI_ComCostCurrency.ProxyEnd();
         }
     }
 }

+ 5 - 4
GameClient/Assets/Game/HotUpdate/Views/Bag/BagExchangeView.cs

@@ -11,7 +11,7 @@ namespace GFGGame
 {
     public class BagExchangeView : BaseWindow
     {
-        private UI_BagExchangeUI _ui;
+        private UI_ItemExchangeUI _ui;
         private int _itemId;
         private int _count;
         public override void Dispose()
@@ -29,8 +29,8 @@ namespace GFGGame
         {
             base.OnInit();
 
-            packageName = UI_BagExchangeUI.PACKAGE_NAME;
-            _ui = UI_BagExchangeUI.Create();
+            packageName = UI_ItemExchangeUI.PACKAGE_NAME;
+            _ui = UI_ItemExchangeUI.Create();
             this.viewCom = _ui.target;
             this.viewCom.Center();
             this.modal = true;
@@ -77,7 +77,8 @@ namespace GFGGame
             _ui.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             RarityIconController.UpdateRarityIcon(_ui.m_loaRarity, itemCfg.id, false);
             _ui.m_loaRarity.visible = itemCfg.itemType == ConstItemType.DRESS_UP;
-            _ui.m_comCost.visible = false;
+            _ui.m_txtExchangeCount.visible = false;
+            _ui.m_comCost.target.visible = true;
         }
 
         private void UpdateUseView()

+ 43 - 33
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/ItemExchangeView.cs

@@ -1,7 +1,8 @@
 using System;
 using ET;
 using FairyGUI;
-using UI.RechargeStore;
+using UI.CommonGame;
+// using UI.RechargeStore;
 
 namespace GFGGame
 {
@@ -28,17 +29,18 @@ namespace GFGGame
         protected override void OnInit()
         {
             base.OnInit();
-            packageName = UI_GiftBagBuyUI.PACKAGE_NAME;
+            packageName = UI_ItemExchangeUI.PACKAGE_NAME;
             _ui = UI_ItemExchangeUI.Create();
             this.viewCom = _ui.target;
             this.viewCom.Center();
             this.modal = true;
             viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
 
-            _ui.m_btnPlus.onClick.Add(OnBtnPlusClick);
-            _ui.m_btnMinus.onClick.Add(OnBtnMinusClick);
-            _ui.m_btnAll.onClick.Add(OnBtnAllClick);
-            _ui.m_btnExchange.onClick.Add(OnBtnExchangeClick);
+            _ui.m_btnAdd.target.onClick.Add(OnBtnPlusClick);
+            _ui.m_btnMinus.target.onClick.Add(OnBtnMinusClick);
+            _ui.m_btnMax.target.onClick.Add(OnBtnAllClick);
+            _ui.m_btnConfirm.onClick.Add(OnBtnExchangeClick);
+            _ui.m_btnCancle.onClick.Add(this.Hide);
         }
 
         protected override void OnShown()
@@ -49,15 +51,19 @@ namespace GFGGame
             ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(_exchangeId);
 
             _buyCount = 1;
+            int curMoneyCanBuy = ItemDataManager.GetItemNum(cfg.costId) / cfg.costNum;
             if (cfg.maxLimit == 0)
             {
-                _maxCanBuy = Math.Min(ItemDataManager.GetItemNum(cfg.costId) / cfg.costNum, GameConst.MAX_COUNT_TO_BUY_ITEMS);
+                _maxCanBuy = Math.Min(curMoneyCanBuy, GameConst.MAX_COUNT_TO_BUY_ITEMS);
             }
             else
             {
-                _maxCanBuy = Math.Min(ItemDataManager.GetItemNum(cfg.costId) / cfg.costNum, cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id));
+                int lastBuyCount = cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id);//剩余购买次数
+                _maxCanBuy = Math.Min(curMoneyCanBuy, lastBuyCount);
             }
-
+            _maxCanBuy = Math.Max(1, _maxCanBuy);
+            _ui.m_txtExchangeCount.visible = true;
+            _ui.m_comCost.target.visible = true;
             UpdateStaticView();
             UpdateView();
         }
@@ -66,56 +72,60 @@ namespace GFGGame
             ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(_exchangeId);
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemId);
             _ui.m_txtName.text = itemCfg.name;
-            _ui.m_txtDiscribe.text = itemCfg.desc;
-            _ui.m_txtHasCount.text = string.Format("已拥有:{0}", StringUtil.GetColorText(ItemDataManager.GetItemNum(cfg.itemId).ToString(), "#BC8068"));
-            _ui.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
-            _ui.m_rarity.visible = false;
+            _ui.m_txtDesc.text = string.IsNullOrEmpty(itemCfg.desc) ? "暂无描述" : itemCfg.desc;
+            _ui.m_txtOwned.SetVar("count", ItemDataManager.GetItemNum(cfg.itemId).ToString()).FlushVars();
+            _ui.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
+            _ui.m_loaRarity.visible = false;
             if (ItemUtilCS.IsDressUpItem(cfg.itemId))
             {
-                _ui.m_rarity.visible = true;
-                RarityIconController.UpdateRarityIcon(_ui.m_rarity, cfg.itemId, false);
+                _ui.m_loaRarity.visible = true;
+                RarityIconController.UpdateRarityIcon(_ui.m_loaRarity, cfg.itemId, false);
             }
-            _ui.m_txtLastCount.text = string.Format("剩余:{0}", cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id));
-            if (cfg.maxLimit == 0) _ui.m_txtLastCount.text = "剩余:不限";
-
-            ItemCfg costItemCfg = ItemCfgArray.Instance.GetCfg(cfg.costId);
-            _ui.m_iconPrice.url = ResPathUtil.GetCommonGameResPath(costItemCfg.res);
-
         }
         private void UpdateView()
         {
 
-            _ui.m_btnAll.enabled = _buyCount < _maxCanBuy;
-            _ui.m_btnPlus.enabled = _buyCount < _maxCanBuy;
-
             ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(_exchangeId);
-            _ui.m_txtNum.text = string.Format("x{0}", cfg.num * _buyCount);
-            _ui.m_txtCount.text = _buyCount.ToString();
-            _ui.m_txtPrice.text = (_buyCount * cfg.costNum).ToString();
+            _ui.m_txtExchangeCount.text = string.Format("x{0}", cfg.num * _buyCount);
+
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemId);
+            _ui.m_txtCostCount.text = _buyCount.ToString();
+            _ui.m_btnMinus.m_c1.selectedIndex = _buyCount == 1 ? 1 : 0;
+            _ui.m_btnMinus.target.touchable = _buyCount == 1 ? false : true;
+            // int hasCount = ItemDataManager.GetItemNum(cfg.itemId);
+            _ui.m_btnAdd.m_c1.selectedIndex = _buyCount == _maxCanBuy ? 1 : 0;
+            _ui.m_btnAdd.target.touchable = _buyCount == _maxCanBuy ? false : true;
+            _ui.m_btnMax.m_c1.selectedIndex = _buyCount == _maxCanBuy ? 1 : 0;
+            _ui.m_btnMax.target.touchable = _buyCount == _maxCanBuy ? false : true;
+
+            _ui.m_txtTips.text = string.Format("确定购买{0}个{1}?", _buyCount, itemCfg.name);
+            ItemUtil.SetItemNeedNum(_ui.m_comCost.target, cfg.costId, _buyCount * cfg.costNum);
         }
 
 
         private void OnBtnPlusClick()
         {
             _buyCount++;
+            _buyCount = Math.Min(_buyCount, _maxCanBuy);
             UpdateView();
 
         }
 
         private void OnBtnMinusClick()
         {
-            if (_buyCount == 1)
-            {
-                PromptController.Instance.ShowFloatTextPrompt("已经是最小数量了");
-                return;
-            }
+            // if (_buyCount == 1)
+            // {
+            //     PromptController.Instance.ShowFloatTextPrompt("已经是最小数量了");
+            //     return;
+            // }
 
             _buyCount--;
+            _buyCount = Math.Max(1, _buyCount);
             UpdateView();
         }
         private void OnBtnAllClick()
         {
-            _buyCount = _maxCanBuy;
+            _buyCount = Math.Max(1, _maxCanBuy);
             UpdateView();
         }
         private async void OnBtnExchangeClick()

二进制
GameClient/Assets/ResIn/UI/Bag/Bag_atlas0.png


二进制
GameClient/Assets/ResIn/UI/Bag/Bag_fui.bytes


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


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


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


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


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