Bladeren bron

商店valuebar

zhaoyang 2 jaren geleden
bovenliggende
commit
b2ca305dce
33 gewijzigde bestanden met toevoegingen van 404 en 167 verwijderingen
  1. 1 1
      FGUIProject/assets/CommonGame/components/ButtonInValueBar.xml
  2. 8 1
      FGUIProject/assets/CommonGame/components/ComponentValueBar.xml
  3. 1 0
      FGUIProject/assets/Store/StoreChargeAddUpUI.xml
  4. 1 0
      FGUIProject/assets/Store/StoreChargeUI.xml
  5. 2 1
      FGUIProject/assets/Store/StoreExchangeUI.xml
  6. 1 0
      FGUIProject/assets/Store/StoreGiftBagUI.xml
  7. 0 1
      FGUIProject/assets/Store/StoreUI.xml
  8. 2 2
      FGUIProject/assets/Store/components/ListChargeItem.xml
  9. 9 9
      FGUIProject/assets/Store/components/ListGiftItem.xml
  10. 3 3
      FGUIProject/assets/Store/components/ListShopItem.xml
  11. 55 26
      GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs
  12. 71 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ButtonInValueBar.cs
  13. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ButtonInValueBar.cs.meta
  14. 36 22
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComponentValueBar.cs
  15. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreChargeAddUpUI.cs
  16. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreChargeUI.cs
  17. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreExchangeUI.cs
  18. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreGiftBagUI.cs
  19. 0 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreUI.cs
  20. 1 1
      GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaView.cs
  21. 134 75
      GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs
  22. 11 2
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreArenaView.cs
  23. 10 2
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreChargeAddUpView.cs
  24. 9 1
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreChargeView.cs
  25. 11 2
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreExchangeView.cs
  26. 11 2
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreGiftBagView.cs
  27. 4 13
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreView.cs
  28. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png
  29. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png
  30. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png
  31. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png
  32. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes
  33. BIN
      GameClient/Assets/ResIn/UI/Store/Store_fui.bytes

+ 1 - 1
FGUIProject/assets/CommonGame/components/ButtonInValueBar.xml

@@ -3,7 +3,7 @@
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
     <image id="n0_r9gf" name="n0" src="qkjstle" fileName="imagesNew/Resources_Underprint.png" xy="1,13" size="238,42" group="n4_qqat"/>
-    <image id="n3_r9gf" name="n3" src="qkjstld" fileName="imagesNew/fzd_jia.png" xy="175,9" group="n4_qqat"/>
+    <image id="n3_r9gf" name="imgAdd" src="qkjstld" fileName="imagesNew/fzd_jia.png" xy="175,9" group="n4_qqat"/>
     <text id="n1_r9gf" name="title" xy="83,14" pivot="0.5,0" size="72,39" group="n4_qqat" font="ui://eg2y0ldpa0cftks" fontSize="28" color="#ffffff" vAlign="middle" singleLine="true" autoClearText="true" text="66666"/>
     <loader id="n2_r9gf" name="icon" xy="17,14" pivot="0.5,0.5" size="40,40" group="n4_qqat" aspect="true" url="ui://eg2y0ldply9g8n" align="center" vAlign="middle" fill="scale"/>
     <group id="n4_qqat" name="n4" xy="1,9" size="238,50"/>

+ 8 - 1
FGUIProject/assets/CommonGame/components/ComponentValueBar.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,70" opaque="false">
-  <controller name="c1" exported="true" pages="0,,1,,3,,4,,5,,6,,7,,8,,9,,10,,12,,13," selected="11">
+  <controller name="c1" exported="true" pages="0,,1,,3,,4,,5,,6,,7,,8,,9,,10,,12,,13,,14," selected="11">
     <remark page="0" value="体力金币马蹄珍珠"/>
     <remark page="1" value="体力金币马蹄"/>
     <remark page="2" value="抽卡兑换"/>
@@ -13,6 +13,7 @@
     <remark page="9" value="金币马蹄珍珠"/>
     <remark page="10" value="竞技场"/>
     <remark page="11" value="雅集"/>
+    <remark page="12" value="商店列表"/>
   </controller>
   <displayList>
     <component id="n43_vek8" name="btnCJLuoXing" src="r9gf5z" fileName="components/ButtonInValueBar.xml" xy="460,5">
@@ -70,5 +71,11 @@
       <gearXY controller="c1" pages="0,1,3,5,6,8,10,12,13" values="814,0|814,2|1207,5|814,0|814,2|688,5|814,0|814,0|814,1" default="688,5"/>
       <Button title="100" icon="ui://eg2y0ldpkztethq"/>
     </component>
+    <list id="n51_l500" name="list" xy="24,0" size="1031,70" layout="row" overflow="scroll" colGap="30" defaultItem="ui://eg2y0ldpr9gf5z" align="right">
+      <gearDisplay controller="c1" pages="14"/>
+      <item/>
+      <item/>
+      <item/>
+    </list>
   </displayList>
 </component>

+ 1 - 0
FGUIProject/assets/Store/StoreChargeAddUpUI.xml

@@ -2,6 +2,7 @@
 <component size="1080,1920" opaque="false">
   <displayList>
     <text id="n31_hhx9" name="n31" xy="230,723" size="619,39" fontSize="28" color="#8c8580" text="游戏中任意付费会按照1人民币*10换算成会员经验"/>
+    <component id="n34_l500" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="0,95" controller="c1,10"/>
     <component id="n33_hhx9" name="comVipLv" src="hhx91r" fileName="components/ComVipLv.xml" xy="62,493"/>
     <list id="n10_d4iw" name="list" xy="0,793" size="1080,1033" layout="flow_hz" overflow="hidden" colGap="20" defaultItem="ui://p9mtgheohhx91i" align="center" scrollItemToViewOnClick="false">
       <relation target="" sidePair="bottomext-bottom"/>

+ 1 - 0
FGUIProject/assets/Store/StoreChargeUI.xml

@@ -2,6 +2,7 @@
 <component size="1080,1920" opaque="false">
   <displayList>
     <text id="n31_hhx9" name="n31" xy="230,723" size="619,39" fontSize="28" color="#8c8580" text="游戏中任意付费会按照1人民币*10换算成会员经验"/>
+    <component id="n34_l500" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="0,95" controller="c1,10"/>
     <component id="n33_hhx9" name="comVipLv" src="hhx91r" fileName="components/ComVipLv.xml" xy="62,493"/>
     <list id="n10_d4iw" name="list" xy="0,793" size="1080,1033" layout="flow_hz" overflow="hidden" colGap="20" defaultItem="ui://p9mtgheohhx91i" align="center" scrollItemToViewOnClick="false">
       <relation target="" sidePair="bottomext-bottom"/>

+ 2 - 1
FGUIProject/assets/Store/StoreExchangeUI.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920" opaque="false">
   <displayList>
-    <list id="n0_l500" name="list" xy="74,513" size="932,1316" layout="flow_hz" overflow="scroll" lineGap="30" colGap="10" defaultItem="ui://p9mtgheo10not1t" autoClearItems="true">
+    <list id="n0_l500" name="list" xy="83,513" size="913,1316" layout="flow_hz" overflow="scroll" lineGap="20" colGap="10" defaultItem="ui://p9mtgheo10not1t" autoClearItems="true">
       <relation target="" sidePair="bottomext-bottom"/>
       <item/>
       <item/>
@@ -17,5 +17,6 @@
     <component id="n2_l500" name="n2" src="hhx90" fileName="components/ComZhuangShi.xml" xy="690,1420">
       <relation target="" sidePair="right-right,bottom-bottom"/>
     </component>
+    <component id="n4_l500" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="0,95" controller="c1,14"/>
   </displayList>
 </component>

+ 1 - 0
FGUIProject/assets/Store/StoreGiftBagUI.xml

@@ -17,5 +17,6 @@
     <component id="n2_l500" name="n2" src="hhx90" fileName="components/ComZhuangShi.xml" xy="690,1420">
       <relation target="" sidePair="right-right,bottom-bottom"/>
     </component>
+    <component id="n3_l500" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="0,95" controller="c1,14"/>
   </displayList>
 </component>

+ 0 - 1
FGUIProject/assets/Store/StoreUI.xml

@@ -8,7 +8,6 @@
     <image id="n17_fqor" name="n17" src="fqortb7" fileName="imagesNew/sc_beijing_shang.png" xy="0,0"/>
     <image id="n14_fqor" name="n14" src="fqortb6" fileName="imagesNew/sc_beijing_hua.png" xy="622,0"/>
     <image id="n9_fqor" name="n9" src="fqortb3" fileName="imagesNew/sc_line1.png" xy="81,444"/>
-    <component id="n2_fqor" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="0,95" controller="c1,10"/>
     <component id="n1_fqor" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80"/>
     <image id="n10_fqor" name="n10" src="fqortb2" fileName="imagesNew/sc_line2.png" xy="55,327"/>
     <image id="n19_fqor" name="n19" src="fqortay" fileName="imagesNew/sc_zhuangshihua1.png" xy="0,0"/>

+ 2 - 2
FGUIProject/assets/Store/components/ListChargeItem.xml

@@ -5,13 +5,13 @@
     <loader id="n15_d4iw" name="icon" xy="52,166" size="197,197" aspect="true" url="ui://p9mtgheohhx91j" fill="scaleMatchHeight"/>
     <image id="n12_d4iw" name="imgDouble" src="hhx9a" fileName="imagesNew/wp_save_baseboard.png" xy="-1,338"/>
     <image id="n24_hhx9" name="n24" src="fqortau" fileName="imagesNew/sc_xian.png" xy="33,104" size="236,4"/>
-    <text id="n16_d4iw" name="txtName" xy="80,52" pivot="0.5,0" size="142,54" font="ui://eg2y0ldpa0cftks" fontSize="40" color="#5a3e16" align="center" text="钻石600">
+    <text id="n16_d4iw" name="txtName" xy="13,56" pivot="0.5,0" size="275,46" font="ui://eg2y0ldpa0cftks" fontSize="34" color="#5a3e16" align="center" letterSpacing="-2" text="稀有升星材料(自选)">
       <relation target="" sidePair="center-center,middle-middle"/>
     </text>
     <component id="n14_d4iw" name="btnBuy" src="iftftaf" fileName="components/Component2.xml" xy="18,412" size="265,80">
       <relation target="" sidePair="center-center"/>
     </component>
     <text id="n18_dmsi" name="txtDesc" xy="48,380" pivot="0.5,0" size="204,36" font="ui://eg2y0ldpa0cftks" fontSize="26" color="#ac4100" letterSpacing="-2" text="首充赠送+6000钻石"/>
-    <text id="n23_hhx9" name="n23" xy="9,337" size="122,42" fontSize="30" color="#ffffff" text="首充双倍"/>
+    <text id="n23_hhx9" name="n23" xy="9,337" size="122,41" fontSize="30" color="#ffffff" text="首充双倍"/>
   </displayList>
 </component>

+ 9 - 9
FGUIProject/assets/Store/components/ListGiftItem.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="460,270" overflow="hidden">
-  <controller name="c1" alias="礼包购买状态" pages="0,,1," selected="1">
+<component size="451,270" overflow="hidden">
+  <controller name="c1" alias="礼包购买状态" pages="0,,1," selected="0">
     <remark page="0" value="可购买"/>
     <remark page="1" value="已售罄"/>
   </controller>
@@ -12,23 +12,23 @@
     <image id="n22_10not" name="n22" src="hhx91f" fileName="imagesNew/GiftBag_baseboard1.png" xy="26,0"/>
     <image id="n47_l500" name="imgDouble" src="hhx9v" fileName="imagesNew/font_save_baseboard.png" xy="0,-1" group="n26_10not"/>
     <text id="n48_l500" name="n48" xy="17,7" size="69,46" group="n26_10not" fontSize="34" color="#ffffff" letterSpacing="-2" text="超值"/>
-    <text id="n49_l500" name="txtDesc" xy="13,32" pivot="0.5,0" size="55,51" group="n51_l500" fontSize="38" color="#ffffff" align="center" letterSpacing="-2" strokeColor="#cc3300" text="800"/>
-    <text id="n50_l500" name="n50" xy="68,42" size="22,36" group="n51_l500" fontSize="26" color="#ffffff" letterSpacing="-2" text="%"/>
-    <group id="n51_l500" name="n51" xy="13,32" size="77,51" group="n26_10not" advanced="true" layout="hz" excludeInvisibles="true">
+    <text id="n49_l500" name="txtDesc" xy="8,32" pivot="0.5,0" size="55,51" group="n51_l500" fontSize="38" color="#ffffff" align="center" letterSpacing="-2" strokeColor="#cc3300" text="800"/>
+    <text id="n50_l500" name="n50" xy="63,42" size="22,36" group="n51_l500" fontSize="26" color="#ffffff" letterSpacing="-2" text="%"/>
+    <group id="n51_l500" name="n51" xy="8,32" size="77,51" group="n26_10not" advanced="true" layout="hz" excludeInvisibles="true">
       <relation target="" sidePair="center-center"/>
     </group>
     <group id="n26_10not" name="grpDiscount" xy="0,-1" size="100,96" advanced="true"/>
     <loader id="n23_10not" name="icon" xy="61,55" size="162,162" aspect="true" url="ui://p9mtgheohhx91n" fill="scaleMatchHeight"/>
-    <text id="n27_10not" name="txtName" xy="328,26" pivot="0.5,0" anchor="true" size="74,49" fontSize="36" color="#5a3e16" align="center" leading="-5" letterSpacing="-2" text="珍珠"/>
+    <text id="n27_10not" name="txtName" xy="248,14" pivot="0.5,0" anchor="true" size="261,44" fontSize="32" color="#5a3e16" align="center" leading="-5" letterSpacing="-2" text="稀有升星材料(自选)"/>
     <text id="n29_10not" name="txtEndTime" xy="81,220" pivot="0.5,0" size="111,36" fontSize="26" color="#ac4100" align="center" leading="-5" letterSpacing="-2" text="1天后下架"/>
     <text id="n32_10not" name="txtLimit" xy="229,76" pivot="0.5,0" size="199,36" fontSize="26" color="#8c8580" align="center" leading="-5" letterSpacing="-2" ubb="true" text="每日限购(10/10)"/>
-    <text id="n31_10not" name="txtLock" xy="330,111" pivot="0.5,0" anchor="true" size="239,36" fontSize="26" color="#8c8580" align="center" leading="-5" letterSpacing="-2" text="飞花令达到段位07解锁">
-      <gearDisplay controller="c2" pages="0"/>
-    </text>
     <text id="n44_iftf" name="n44" xy="299,120" size="81,36" fontSize="26" color="#a59f8f" align="center" text="已售罄">
       <gearDisplay controller="c1" pages="1"/>
       <gearDisplay2 controller="c2" pages="1" condition="0"/>
     </text>
+    <text id="n31_10not" name="txtLock" xy="330,111" pivot="0.5,0" anchor="true" size="143,52" fontSize="22" color="#8c8580" align="center" leading="-5" letterSpacing="-2" text="飞花令达到段位&#xA;巴拉巴拉啦解锁">
+      <gearDisplay controller="c2" pages="0"/>
+    </text>
     <image id="n45_t8xr" name="n45" src="10not1u" fileName="images/sc_kuangand.png" xy="-7,-61" size="474,379">
       <gearDisplay controller="c1" pages="1"/>
       <gearDisplay2 controller="c2" pages="0" condition="1"/>

+ 3 - 3
FGUIProject/assets/Store/components/ListShopItem.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="290,455" overflow="hidden">
-  <controller name="c1" alias="礼包购买状态" pages="0,,1," selected="0">
+  <controller name="c1" alias="礼包购买状态" pages="0,,1," selected="1">
     <remark page="0" value="可购买"/>
     <remark page="1" value="已售罄"/>
   </controller>
-  <controller name="c2" alias="礼包解锁状态" pages="0,,1," selected="0">
+  <controller name="c2" alias="礼包解锁状态" pages="0,,1," selected="1">
     <remark page="0" value="未解锁"/>
     <remark page="1" value="已解锁"/>
   </controller>
@@ -19,7 +19,7 @@
     </group>
     <group id="n26_10not" name="grpDiscount" xy="191,263" size="100,96" advanced="true"/>
     <loader id="n23_10not" name="icon" xy="61,169" size="162,162" aspect="true" url="ui://p9mtgheohhx91n" fill="scaleMatchHeight"/>
-    <text id="n27_10not" name="txtName" xy="145,72" pivot="0.5,0" anchor="true" size="74,49" fontSize="36" color="#5a3e16" align="center" leading="-5" letterSpacing="-2" text="珍珠"/>
+    <text id="n27_10not" name="txtName" xy="145,78" pivot="0.5,0" anchor="true" size="261,44" fontSize="32" color="#5a3e16" align="center" leading="-5" letterSpacing="-2" text="稀有升星材料(自选)"/>
     <text id="n29_10not" name="txtEndTime" xy="89,340" pivot="0.5,0" size="111,36" fontSize="26" color="#ac4100" align="center" leading="-5" letterSpacing="-2" vars="true" text="{value=1天}后下架"/>
     <text id="n56_l500" name="txtLimit" xy="45,121" pivot="0.5,0" size="199,36" fontSize="26" color="#8c8580" align="center" leading="-5" letterSpacing="-2" ubb="true" text="每日限购(10/10)"/>
     <text id="n31_10not" name="txtLock" xy="145,150" pivot="0.5,0" anchor="true" size="229,36" fontSize="26" color="#8c8580" align="center" leading="-5" letterSpacing="-2" text="飞花令达到段位7解锁">

+ 55 - 26
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -162,47 +162,75 @@ namespace GFGGame
             // return giftBagCfgs;
             return null;
         }
-
-        public List<ShopCfg> SortGiftBagCfgs(List<ShopCfg> shopCfgs)
+        public List<ShopCfg> SortShopGoodsCfgs(List<ShopCfg> shopCfgs)
         {
             shopCfgs.Sort((ShopCfg a, ShopCfg b) =>
             {
-
-                //未售罄的>未解锁>已售罄的
+                //未售罄的>已售罄的
                 int buyTypeA = (a.maxBuyNum == 0 || a.maxBuyNum - GetGoodsBuyNumById(a.id) > 0) ? 1 : -1;
                 int buyTypeB = (b.maxBuyNum == 0 || b.maxBuyNum - GetGoodsBuyNumById(b.id) > 0) ? 1 : -1;
                 if (buyTypeA > buyTypeB) return -1;
                 if (buyTypeA < buyTypeB) return 1;
 
-                //解锁状态
-                int lockA = GetShopGoodsStateById(a.id) ? 1 : -1;
-                int lockB = GetShopGoodsStateById(b.id) ? 1 : -1;
-                if (lockA > lockB) return -1;
-                if (lockA < lockB) return 1;
+                return a.id - b.id;
+            });
+            return shopCfgs;
+        }
+        public List<int> GetShopCostIds(List<ShopCfg> shopCfgs)
+        {
+            List<int> costIds = new List<int>();
+            for (int i = 0; i < shopCfgs.Count; i++)
+            {
+                if (shopCfgs[i].costId == 0) continue;
+                if (costIds.IndexOf(shopCfgs[i].costId) < 0)
+                {
+                    costIds.Add(shopCfgs[i].costId);
+                }
+            }
+            return costIds;
+        }
+        // public List<ShopCfg> SortGiftBagCfgs(List<ShopCfg> shopCfgs)
+        // {
+        //     shopCfgs.Sort((ShopCfg a, ShopCfg b) =>
+        //     {
+
+        //         //未售罄的>未解锁>已售罄的
+        //         int buyTypeA = (a.maxBuyNum == 0 || a.maxBuyNum - GetGoodsBuyNumById(a.id) > 0) ? 1 : -1;
+        //         int buyTypeB = (b.maxBuyNum == 0 || b.maxBuyNum - GetGoodsBuyNumById(b.id) > 0) ? 1 : -1;
+        //         if (buyTypeA > buyTypeB) return -1;
+        //         if (buyTypeA < buyTypeB) return 1;
 
-                //免费>钻石>现金>道具
-                if (a.costType < b.costType) return -1;
-                if (a.costType > b.costType) return 1;
+        //         //解锁状态
+        //         int lockA = GetShopGoodsStateById(a.id) ? 1 : -1;
+        //         int lockB = GetShopGoodsStateById(b.id) ? 1 : -1;
+        //         if (lockA > lockB) return -1;
+        //         if (lockA < lockB) return 1;
 
-                //有下架时间的 > 没有下架时间的
-                int endTimeA = a.endTime != "" ? 1 : -1;
-                int endTimeB = b.endTime != "" ? 1 : -1;
-                if (endTimeA > endTimeB) return -1;
-                if (endTimeA < endTimeB) return 1;
+        //         //免费>钻石>现金>道具
+        //         if (a.costType < b.costType) return -1;
+        //         if (a.costType > b.costType) return 1;
 
+        //         //有下架时间的 > 没有下架时间的
+        //         int endTimeA = a.endTime != "" ? 1 : -1;
+        //         int endTimeB = b.endTime != "" ? 1 : -1;
+        //         if (endTimeA > endTimeB) return -1;
+        //         if (endTimeA < endTimeB) return 1;
 
 
-                int disCountA = GetShopGoodsDiscount(a.id);
-                int disCountB = GetShopGoodsDiscount(b.id);
-                if (disCountA != disCountB) return disCountA - disCountB;
+        //         //折扣打的>折扣小的
+        //         int disCountA = GetShopGoodsDiscount(a.id);
+        //         int disCountB = GetShopGoodsDiscount(b.id);
+        //         if (disCountA > disCountB) return -1;
+        //         if (disCountA < disCountB) return 1;
 
-                if (a.price != b.price) return a.price - b.price;
+        //         //价格低的>价格高的
+        //         if (a.price != b.price) return a.price - b.price;
 
 
-                return 0;
-            });
-            return shopCfgs;
-        }
+        //         return 0;
+        //     });
+        //     return shopCfgs;
+        // }
         //获取商品折扣百分比
         public int GetShopGoodsDiscount(int goodsId)
         {
@@ -332,7 +360,8 @@ namespace GFGGame
             }
             else if (shopCfg.lockType == LockType.AREND_GRADE)
             {
-                return string.Format("飞花令达到段位-{0}解锁", shopCfg.lockValue);
+                ArenaRankCfg arenaRankCfg = ArenaRankCfgArray.Instance.GetCfg(shopCfg.lockValue);
+                return string.Format("飞花令达到{0}解锁", arenaRankCfg.gradeName);
             }
             return "";
         }

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ButtonInValueBar.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.CommonGame
+{
+    public partial class UI_ButtonInValueBar
+    {
+        public GButton target;
+        public GImage m_imgAdd;
+        public const string URL = "ui://eg2y0ldpr9gf5z";
+        public const string PACKAGE_NAME = "CommonGame";
+        public const string RES_NAME = "ButtonInValueBar";
+        private static UI_ButtonInValueBar _proxy;
+
+        public static UI_ButtonInValueBar Create(GObject gObject = null)
+        {
+            var ui = new UI_ButtonInValueBar();
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ButtonInValueBar Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ButtonInValueBar();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)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_imgAdd = (GImage)comp.GetChild("imgAdd");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_imgAdd = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ButtonInValueBar.cs.meta

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

+ 36 - 22
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComponentValueBar.cs

@@ -8,17 +8,18 @@ namespace UI.CommonGame
     {
         public GComponent target;
         public Controller m_c1;
-        public GButton m_btnCJLuoXing;
-        public GButton m_btnCJHuoDong;
-        public GButton m_btnTravel;
-        public GButton m_btnGallery;
-        public GButton m_btnPower;
-        public GButton m_btnCJ;
-        public GButton m_btnGold;
-        public GButton m_btnDiamondRed;
-        public GButton m_btnDiamondPurple;
-        public GButton m_btnArena;
-        public GButton m_btnLeagueContribuation;
+        public UI_ButtonInValueBar m_btnCJLuoXing;
+        public UI_ButtonInValueBar m_btnCJHuoDong;
+        public UI_ButtonInValueBar m_btnTravel;
+        public UI_ButtonInValueBar m_btnGallery;
+        public UI_ButtonInValueBar m_btnPower;
+        public UI_ButtonInValueBar m_btnCJ;
+        public UI_ButtonInValueBar m_btnGold;
+        public UI_ButtonInValueBar m_btnDiamondRed;
+        public UI_ButtonInValueBar m_btnDiamondPurple;
+        public UI_ButtonInValueBar m_btnArena;
+        public UI_ButtonInValueBar m_btnLeagueContribuation;
+        public GList m_list;
         public const string URL = "ui://eg2y0ldpv3541v";
         public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComponentValueBar";
@@ -67,32 +68,45 @@ namespace UI.CommonGame
         private void Init(GComponent comp)
         {
             m_c1 = comp.GetController("c1");
-            m_btnCJLuoXing = (GButton)comp.GetChild("btnCJLuoXing");
-            m_btnCJHuoDong = (GButton)comp.GetChild("btnCJHuoDong");
-            m_btnTravel = (GButton)comp.GetChild("btnTravel");
-            m_btnGallery = (GButton)comp.GetChild("btnGallery");
-            m_btnPower = (GButton)comp.GetChild("btnPower");
-            m_btnCJ = (GButton)comp.GetChild("btnCJ");
-            m_btnGold = (GButton)comp.GetChild("btnGold");
-            m_btnDiamondRed = (GButton)comp.GetChild("btnDiamondRed");
-            m_btnDiamondPurple = (GButton)comp.GetChild("btnDiamondPurple");
-            m_btnArena = (GButton)comp.GetChild("btnArena");
-            m_btnLeagueContribuation = (GButton)comp.GetChild("btnLeagueContribuation");
+            m_btnCJLuoXing = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnCJLuoXing"));
+            m_btnCJHuoDong = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnCJHuoDong"));
+            m_btnTravel = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnTravel"));
+            m_btnGallery = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnGallery"));
+            m_btnPower = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnPower"));
+            m_btnCJ = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnCJ"));
+            m_btnGold = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnGold"));
+            m_btnDiamondRed = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnDiamondRed"));
+            m_btnDiamondPurple = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnDiamondPurple"));
+            m_btnArena = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnArena"));
+            m_btnLeagueContribuation = (UI_ButtonInValueBar)UI_ButtonInValueBar.Create(comp.GetChild("btnLeagueContribuation"));
+            m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
+            m_btnCJLuoXing.Dispose();
             m_btnCJLuoXing = null;
+            m_btnCJHuoDong.Dispose();
             m_btnCJHuoDong = null;
+            m_btnTravel.Dispose();
             m_btnTravel = null;
+            m_btnGallery.Dispose();
             m_btnGallery = null;
+            m_btnPower.Dispose();
             m_btnPower = null;
+            m_btnCJ.Dispose();
             m_btnCJ = null;
+            m_btnGold.Dispose();
             m_btnGold = null;
+            m_btnDiamondRed.Dispose();
             m_btnDiamondRed = null;
+            m_btnDiamondPurple.Dispose();
             m_btnDiamondPurple = null;
+            m_btnArena.Dispose();
             m_btnArena = null;
+            m_btnLeagueContribuation.Dispose();
             m_btnLeagueContribuation = null;
+            m_list = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreChargeAddUpUI.cs

@@ -7,6 +7,7 @@ namespace UI.Store
     public partial class UI_StoreChargeAddUpUI
     {
         public GComponent target;
+        public GComponent m_valueBar;
         public UI_ComVipLv m_comVipLv;
         public GList m_list;
         public const string URL = "ui://p9mtgheol500tbf";
@@ -56,11 +57,13 @@ namespace UI.Store
 
         private void Init(GComponent comp)
         {
+            m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_comVipLv = (UI_ComVipLv)UI_ComVipLv.Create(comp.GetChild("comVipLv"));
             m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_valueBar = null;
             m_comVipLv.Dispose();
             m_comVipLv = null;
             m_list = null;

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreChargeUI.cs

@@ -7,6 +7,7 @@ namespace UI.Store
     public partial class UI_StoreChargeUI
     {
         public GComponent target;
+        public GComponent m_valueBar;
         public UI_ComVipLv m_comVipLv;
         public GList m_list;
         public const string URL = "ui://p9mtgheol500tb9";
@@ -56,11 +57,13 @@ namespace UI.Store
 
         private void Init(GComponent comp)
         {
+            m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_comVipLv = (UI_ComVipLv)UI_ComVipLv.Create(comp.GetChild("comVipLv"));
             m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_valueBar = null;
             m_comVipLv.Dispose();
             m_comVipLv = null;
             m_list = null;

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreExchangeUI.cs

@@ -8,6 +8,7 @@ namespace UI.Store
     {
         public GComponent target;
         public GList m_list;
+        public GComponent m_valueBar;
         public const string URL = "ui://p9mtgheol500tbh";
         public const string PACKAGE_NAME = "Store";
         public const string RES_NAME = "StoreExchangeUI";
@@ -56,10 +57,12 @@ namespace UI.Store
         private void Init(GComponent comp)
         {
             m_list = (GList)comp.GetChild("list");
+            m_valueBar = (GComponent)comp.GetChild("valueBar");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_list = null;
+            m_valueBar = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreGiftBagUI.cs

@@ -8,6 +8,7 @@ namespace UI.Store
     {
         public GComponent target;
         public GList m_list;
+        public GComponent m_valueBar;
         public const string URL = "ui://p9mtgheol500tbc";
         public const string PACKAGE_NAME = "Store";
         public const string RES_NAME = "StoreGiftBagUI";
@@ -56,10 +57,12 @@ namespace UI.Store
         private void Init(GComponent comp)
         {
             m_list = (GList)comp.GetChild("list");
+            m_valueBar = (GComponent)comp.GetChild("valueBar");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_list = null;
+            m_valueBar = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 0 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreUI.cs

@@ -8,7 +8,6 @@ namespace UI.Store
     {
         public GComponent target;
         public GLoader m_loaBg;
-        public GComponent m_valueBar;
         public GButton m_btnBack;
         public UI_ComTab m_comTab;
         public GList m_listSubTab;
@@ -60,7 +59,6 @@ namespace UI.Store
         private void Init(GComponent comp)
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
-            m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_comTab = (UI_ComTab)UI_ComTab.Create(comp.GetChild("comTab"));
             m_listSubTab = (GList)comp.GetChild("listSubTab");
@@ -68,7 +66,6 @@ namespace UI.Store
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
-            m_valueBar = null;
             m_btnBack = null;
             m_comTab.Dispose();
             m_comTab = null;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaView.cs

@@ -154,7 +154,7 @@ namespace GFGGame
         }
         private void OnBtnShopClick()
         {
-            ViewManager.Show<StoreView>();
+            ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_ARENA, ConstStoreSubId.STORE_ARENA_ITEM });
         }
         private void OnBtnRewardClick()
         {

+ 134 - 75
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -1,6 +1,7 @@
 using UI.CommonGame;
 using FairyGUI;
 using ET;
+using System.Collections.Generic;
 
 namespace GFGGame
 {
@@ -11,65 +12,47 @@ namespace GFGGame
         public ValueBarController(GComponent valueBar, int ctrlSelected = 0)
         {
             _valueBar = UI_ComponentValueBar.Create(valueBar);
-            // _valueBar.m_c1.selectedIndex = ctrlSelected;
-            // _valueBar.target.x = 370;
-            _valueBar.m_btnGold.onClick.Add(() =>
-            {
-
-                ItemUtil.AddGold();
-            });
-            _valueBar.m_btnPower.onClick.Add(() =>
-            {
-
-                ItemUtil.AddPower();
-            });
-            _valueBar.m_btnDiamondPurple.onClick.Add(() =>
-            {
-
-                ItemUtil.AddDiamondPurple();
-            });
-            _valueBar.m_btnDiamondRed.onClick.Add(() =>
-            {
 
-                ItemUtil.AddDiamondRed();
-            });
-            _valueBar.m_btnCJLuoXing.onClick.Add(() =>
-            {
-
-                ViewManager.Show<LuckyBoxView>(LuckyBoxDataManager.BOX_ID_2, new object[] { typeof(ClothingShopView).FullName, new object[] { LuckyBoxDataManager.BOX_ID_2 } });
-
-            });
-            _valueBar.m_btnCJHuoDong.onClick.Add(() =>
-            {
+            _valueBar.m_btnGold.target.onClick.Add(OnClickGold);
+            _valueBar.m_btnPower.target.onClick.Add(OnClickPower);
+            _valueBar.m_btnDiamondPurple.target.onClick.Add(OnClickDiamondPurple);
+            _valueBar.m_btnDiamondRed.target.onClick.Add(OnClickDiamondRed);
 
-                ViewManager.Show<LuckyBoxView>(LuckyBoxDataManager.BOX_ID_1, new object[] { typeof(ClothingShopView).FullName, new object[] { LuckyBoxDataManager.BOX_ID_1 } });
-
-            });
-
-            _valueBar.m_btnCJ.onClick.Add((EventCallback0)(() =>
-            {
-                int luckyBoxId = LuckyBoxDataManager.Instance.currentBoxId;
-                LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
-
-                ItemUtil.ExchangeItemById(luckyBoxCfg.costID, 1, true);
-
-            }));
-            _valueBar.m_btnTravel.onClick.Add(() =>
-            {
-                object[] sourceDatas = new object[] { GlobalCfgArray.globalCfg.travelCostArr[0], new object[] { typeof(TravelView).FullName, null } };
-                GoodsItemTipsController.ShowItemTips(GlobalCfgArray.globalCfg.travelCostArr[0], sourceDatas);
-            });
-            _valueBar.m_btnGallery.onClick.Add(() =>
-            {
-                ViewManager.Show<PoemGalleryRuleView>();
-            });
-            _valueBar.m_btnLeagueContribuation.onClick.Add(() =>
-            {
-                object[] sourceDatas = new object[] { ConstItemID.LEAGUE_CONTRIBUTION, new object[] { typeof(LeagueSkillUpView).FullName, null } };
-                GoodsItemTipsController.ShowItemTips(ConstItemID.LEAGUE_CONTRIBUTION, sourceDatas);
-            });
+            _valueBar.m_btnTravel.target.onClick.Add(OnClickTravel);
+            _valueBar.m_btnGallery.target.onClick.Add(OnClickGallery);
+            _valueBar.m_btnLeagueContribuation.target.onClick.Add(OnClickLeagueContribuation);
 
         }
+        private void OnClickGold()
+        {
+            ItemUtil.AddGold();
+        }
+        private void OnClickPower()
+        {
+            ItemUtil.AddPower();
+        }
+        private void OnClickDiamondPurple()
+        {
+            ItemUtil.AddDiamondPurple();
+        }
+        private void OnClickDiamondRed()
+        {
+            ItemUtil.AddDiamondRed();
+        }
+        private void OnClickTravel()
+        {
+            object[] sourceDatas = new object[] { GlobalCfgArray.globalCfg.travelCostArr[0], new object[] { typeof(TravelView).FullName, null } };
+            GoodsItemTipsController.ShowItemTips(GlobalCfgArray.globalCfg.travelCostArr[0], sourceDatas);
+        }
+        private void OnClickGallery()
+        {
+            ViewManager.Show<PoemGalleryRuleView>();
+        }
+        private void OnClickLeagueContribuation()
+        {
+            object[] sourceDatas = new object[] { ConstItemID.LEAGUE_CONTRIBUTION, new object[] { typeof(LeagueSkillUpView).FullName, null } };
+            GoodsItemTipsController.ShowItemTips(ConstItemID.LEAGUE_CONTRIBUTION, sourceDatas);
+        }
 
         public void Dispose()
         {
@@ -109,62 +92,138 @@ namespace GFGGame
             UpdateGallery();
             UpdateArena();
             UpdateLeagueContribution();
+            _valueBar.m_list.numItems = _valueBar.m_list.numItems;
         }
         private void UpdateCurrency()
         {
-            _valueBar.m_btnGold.text = "" + RoleDataManager.gold;
-            _valueBar.m_btnDiamondPurple.text = "" + RoleDataManager.diaP;
-            _valueBar.m_btnDiamondRed.text = "" + RoleDataManager.diaR;
+            _valueBar.m_btnGold.target.text = "" + RoleDataManager.gold;
+            _valueBar.m_btnDiamondPurple.target.text = "" + RoleDataManager.diaP;
+            _valueBar.m_btnDiamondRed.target.text = "" + RoleDataManager.diaR;
         }
         private void UpdateNumeric()
         {
-            _valueBar.m_btnPower.text = string.Format("{0}/{1}", RoleDataManager.power, GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit));
+            _valueBar.m_btnPower.target.text = string.Format("{0}/{1}", RoleDataManager.power, GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit));
         }
 
         //ժ�ǣ��齱���һ�
         private void UpdateCJExchange()
         {
-            _valueBar.m_btnCJLuoXing.text = "" + ItemDataManager.GetItemNum(ConstItemID.LUCKYBOX_STORE_COST);
-            _valueBar.m_btnCJLuoXing.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.LUCKYBOX_STORE_COST).res);
+            _valueBar.m_btnCJLuoXing.target.text = "" + ItemDataManager.GetItemNum(ConstItemID.LUCKYBOX_STORE_COST);
+            _valueBar.m_btnCJLuoXing.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.LUCKYBOX_STORE_COST).res);
         }
         private void UpdateCJAExchange()
         {
-            _valueBar.m_btnCJHuoDong.text = "" + ItemDataManager.GetItemNum(ConstItemID.LUCKYBOX_ACTIVITY_STORE_COST);
-            _valueBar.m_btnCJHuoDong.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.LUCKYBOX_ACTIVITY_STORE_COST).res);
+            _valueBar.m_btnCJHuoDong.target.text = "" + ItemDataManager.GetItemNum(ConstItemID.LUCKYBOX_ACTIVITY_STORE_COST);
+            _valueBar.m_btnCJHuoDong.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.LUCKYBOX_ACTIVITY_STORE_COST).res);
         }
 
         public void UpdateCJ()
         {
             LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.currentBoxId);
             if (luckyBoxCfg == null) return;
-            _valueBar.m_btnCJ.text = "" + ItemDataManager.GetItemNum(luckyBoxCfg.costID);
-            _valueBar.m_btnCJ.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(luckyBoxCfg.costID).res);
+            _valueBar.m_btnCJ.target.text = "" + ItemDataManager.GetItemNum(luckyBoxCfg.costID);
+            _valueBar.m_btnCJ.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(luckyBoxCfg.costID).res);
         }
 
         private void UpdateTravel()
         {
             int itemId = GlobalCfgArray.globalCfg.travelCostArr[0];
-            _valueBar.m_btnTravel.text = "" + ItemDataManager.GetItemNum(itemId);
-            _valueBar.m_btnTravel.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(itemId).res);
+            _valueBar.m_btnTravel.target.text = "" + ItemDataManager.GetItemNum(itemId);
+            _valueBar.m_btnTravel.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(itemId).res);
 
         }
 
         private void UpdateGallery()
         {
-            _valueBar.m_btnGallery.text = "" + ItemDataManager.GetItemNum(ConstItemID.GALLERY_STORE_COST);
-            _valueBar.m_btnGallery.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.GALLERY_STORE_COST).res);
+            _valueBar.m_btnGallery.target.text = "" + ItemDataManager.GetItemNum(ConstItemID.GALLERY_STORE_COST);
+            _valueBar.m_btnGallery.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.GALLERY_STORE_COST).res);
         }
         private void UpdateArena()
         {
-            _valueBar.m_btnArena.GetChild("n3").asImage.visible = false;
-            _valueBar.m_btnArena.text = "" + ItemDataManager.GetItemNum(GlobalCfgArray.globalCfg.bonusSpecialWinArr[0][0]);
-            _valueBar.m_btnArena.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(GlobalCfgArray.globalCfg.bonusSpecialWinArr[0][0]).res);
+            _valueBar.m_btnArena.m_imgAdd.visible = false;
+            _valueBar.m_btnArena.target.text = "" + ItemDataManager.GetItemNum(GlobalCfgArray.globalCfg.bonusSpecialWinArr[0][0]);
+            _valueBar.m_btnArena.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(GlobalCfgArray.globalCfg.bonusSpecialWinArr[0][0]).res);
         }
         private void UpdateLeagueContribution()
         {
-            _valueBar.m_btnLeagueContribuation.GetChild("n3").asImage.visible = false;
-            _valueBar.m_btnLeagueContribuation.text = "" + ItemDataManager.GetItemNum(ConstItemID.LEAGUE_CONTRIBUTION);
-            _valueBar.m_btnLeagueContribuation.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.LEAGUE_CONTRIBUTION).res);
+            _valueBar.m_btnLeagueContribuation.target.text = "" + ItemDataManager.GetItemNum(ConstItemID.LEAGUE_CONTRIBUTION);
+            _valueBar.m_btnLeagueContribuation.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(ConstItemID.LEAGUE_CONTRIBUTION).res);
+        }
+
+        public void UpdateList(List<int> itemIds)
+        {
+            if (_valueBar.m_list.data == null)
+            {
+                _valueBar.m_list.itemRenderer = RenderListItem;
+            }
+            _valueBar.m_list.data = itemIds;
+            _valueBar.m_list.numItems = itemIds.Count;
+        }
+
+        private void RenderListItem(int index, GObject obj)
+        {
+            int itemId = (obj.parent.data as List<int>)[index];
+            UpdateButton(obj, itemId);
+        }
+        private void UpdateButton(GObject obj, int itemId)
+        {
+            UI_ButtonInValueBar button = UI_ButtonInValueBar.Proxy(obj);
+            button.target.text = "" + ItemDataManager.GetItemNum(itemId);
+            button.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(itemId).res);
+            switch (itemId)
+            {
+                case ConstItemID.GOLD:
+                case ConstItemID.POWER:
+                case ConstItemID.DIAMOND_PURPLE:
+                case ConstItemID.DIAMOND_RED:
+                case ConstItemID.TRAVEL:
+                case ConstItemID.GALLERY_STORE_COST:
+                case ConstItemID.LEAGUE_CONTRIBUTION:
+                    button.m_imgAdd.visible = true;
+                    break;
+                default:
+                    button.m_imgAdd.visible = false;
+                    break;
+            }
+            if (button.target.data == null)
+            {
+                button.target.onClick.Add(OnBtnClick);
+            }
+            button.target.data = itemId;
+            UI_ButtonInValueBar.ProxyEnd();
+        }
+
+        private void OnBtnClick(EventContext context)
+        {
+            int itemId = (int)(context.sender as GObject).data;
+            OnBtnClick(itemId);
+        }
+        private void OnBtnClick(int itemId)
+        {
+            switch (itemId)
+            {
+                case ConstItemID.GOLD:
+                    OnClickGold();
+                    break;
+                case ConstItemID.POWER:
+                    OnClickPower();
+                    break;
+                case ConstItemID.DIAMOND_PURPLE:
+                    OnClickDiamondPurple();
+                    break;
+                case ConstItemID.DIAMOND_RED:
+                    OnClickDiamondRed();
+                    break;
+                case ConstItemID.TRAVEL:
+                    OnClickGold();
+                    break;
+                case ConstItemID.GALLERY_STORE_COST:
+                    OnClickGallery();
+                    break;
+                case ConstItemID.LEAGUE_CONTRIBUTION:
+                    OnClickLeagueContribuation();
+                    break;
+            }
         }
     }
 }

+ 11 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/StoreArenaView.cs

@@ -9,11 +9,16 @@ namespace GFGGame
     public class StoreArenaView : BaseWindow
     {
         private UI_StoreExchangeUI _ui;
+        private ValueBarController _valueBarController;
         private List<ShopCfg> _shopCfgs;
 
         public override void Dispose()
         {
-
+            if (_valueBarController != null)
+            {
+                _valueBarController.Dispose();
+                _valueBarController = null;
+            }
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -32,6 +37,7 @@ namespace GFGGame
             this.clickBlankToClose = false;
 
             _ui.m_list.itemRenderer = ListItemRenderer;
+            _valueBarController = new ValueBarController(_ui.m_valueBar);
         }
         protected override void AddEventListener()
         {
@@ -43,12 +49,15 @@ namespace GFGGame
             base.OnShown();
             int menu2 = (int)this.viewData;
             _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_ARENA, menu2);
+            _valueBarController.OnShown();
+            _valueBarController.UpdateList(ShopDataManager.Instance.GetShopCostIds(_shopCfgs));
             UpdateView();
         }
 
         protected override void OnHide()
         {
             base.OnHide();
+            _valueBarController.OnHide();
         }
         protected override void RemoveEventListener()
         {
@@ -58,7 +67,7 @@ namespace GFGGame
 
         private void UpdateView()
         {
-            _shopCfgs = ShopDataManager.Instance.SortGiftBagCfgs(_shopCfgs);
+            _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
             _ui.m_list.numItems = _shopCfgs.Count;
         }
         private void ListItemRenderer(int index, GObject obj)

+ 10 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/StoreChargeAddUpView.cs

@@ -9,11 +9,16 @@ namespace GFGGame
     public class StoreChargeAddUpView : BaseWindow
     {
         private UI_StoreGiftBagUI _ui;
+        private ValueBarController _valueBarController;
         private List<ShopCfg> _shopCfgs;
 
         public override void Dispose()
         {
-
+            if (_valueBarController != null)
+            {
+                _valueBarController.Dispose();
+                _valueBarController = null;
+            }
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -32,6 +37,7 @@ namespace GFGGame
             this.clickBlankToClose = false;
 
             _ui.m_list.itemRenderer = ListItemRenderer;
+            _valueBarController = new ValueBarController(_ui.m_valueBar);
         }
         protected override void AddEventListener()
         {
@@ -42,13 +48,15 @@ namespace GFGGame
             base.OnShown();
             int menu2 = (int)this.viewData;
             _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_GIFT_BAG, menu2);
-            _shopCfgs = ShopDataManager.Instance.SortGiftBagCfgs(_shopCfgs);
+            _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
             _ui.m_list.numItems = _shopCfgs.Count;
+            _valueBarController.OnShown();
         }
 
         protected override void OnHide()
         {
             base.OnHide();
+            _valueBarController.OnHide();
         }
         protected override void RemoveEventListener()
         {

+ 9 - 1
GameClient/Assets/Game/HotUpdate/Views/Store/StoreChargeView.cs

@@ -9,11 +9,16 @@ namespace GFGGame
     public class StoreChargeView : BaseWindow
     {
         private UI_StoreChargeUI _ui;
+        private ValueBarController _valueBarController;
         private List<ShopCfg> _shopCfgs;
 
         public override void Dispose()
         {
-
+            if (_valueBarController != null)
+            {
+                _valueBarController.Dispose();
+                _valueBarController = null;
+            }
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -32,6 +37,7 @@ namespace GFGGame
             this.clickBlankToClose = false;
 
             _ui.m_list.itemRenderer = ListItemRenderer;
+            _valueBarController = new ValueBarController(_ui.m_valueBar);
         }
         protected override void AddEventListener()
         {
@@ -44,6 +50,7 @@ namespace GFGGame
             base.OnShown();
             _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_CHARGE, ConstStoreSubId.STORE_CHARGE);
             _ui.m_list.numItems = _shopCfgs.Count;
+            _valueBarController.OnShown();
             UpdateVipProgressCom();
         }
 
@@ -54,6 +61,7 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
+            _valueBarController.OnHide();
         }
         protected override void RemoveEventListener()
         {

+ 11 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/StoreExchangeView.cs

@@ -9,11 +9,16 @@ namespace GFGGame
     public class StoreExchangeView : BaseWindow
     {
         private UI_StoreExchangeUI _ui;
+        private ValueBarController _valueBarController;
         private List<ShopCfg> _shopCfgs;
 
         public override void Dispose()
         {
-
+            if (_valueBarController != null)
+            {
+                _valueBarController.Dispose();
+                _valueBarController = null;
+            }
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -32,6 +37,7 @@ namespace GFGGame
             this.clickBlankToClose = false;
 
             _ui.m_list.itemRenderer = ListItemRenderer;
+            _valueBarController = new ValueBarController(_ui.m_valueBar);
         }
         protected override void AddEventListener()
         {
@@ -43,12 +49,15 @@ namespace GFGGame
             base.OnShown();
             int menu2 = (int)this.viewData;
             _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_EXCHANGE, menu2);
+            _valueBarController.OnShown();
+            _valueBarController.UpdateList(ShopDataManager.Instance.GetShopCostIds(_shopCfgs));
             UpdateView();
         }
 
         protected override void OnHide()
         {
             base.OnHide();
+            _valueBarController.OnHide();
         }
         protected override void RemoveEventListener()
         {
@@ -58,7 +67,7 @@ namespace GFGGame
 
         private void UpdateView()
         {
-            _shopCfgs = ShopDataManager.Instance.SortGiftBagCfgs(_shopCfgs);
+            _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
             _ui.m_list.numItems = _shopCfgs.Count;
         }
         private void ListItemRenderer(int index, GObject obj)

+ 11 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/StoreGiftBagView.cs

@@ -9,11 +9,16 @@ namespace GFGGame
     public class StoreGiftBagView : BaseWindow
     {
         private UI_StoreGiftBagUI _ui;
+        private ValueBarController _valueBarController;
         private List<ShopCfg> _shopCfgs;
 
         public override void Dispose()
         {
-
+            if (_valueBarController != null)
+            {
+                _valueBarController.Dispose();
+                _valueBarController = null;
+            }
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -32,6 +37,7 @@ namespace GFGGame
             this.clickBlankToClose = false;
 
             _ui.m_list.itemRenderer = ListItemRenderer;
+            _valueBarController = new ValueBarController(_ui.m_valueBar);
         }
         protected override void AddEventListener()
         {
@@ -43,12 +49,15 @@ namespace GFGGame
             base.OnShown();
             int menu2 = (int)this.viewData;
             _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_GIFT_BAG, menu2);
+            _valueBarController.OnShown();
+            _valueBarController.UpdateList(ShopDataManager.Instance.GetShopCostIds(_shopCfgs));
             UpdateView();
         }
 
         protected override void OnHide()
         {
             base.OnHide();
+            _valueBarController.OnHide();
         }
         protected override void RemoveEventListener()
         {
@@ -58,7 +67,7 @@ namespace GFGGame
 
         private void UpdateView()
         {
-            _shopCfgs = ShopDataManager.Instance.SortGiftBagCfgs(_shopCfgs);
+            _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
             _ui.m_list.numItems = _shopCfgs.Count;
         }
         private void ListItemRenderer(int index, GObject obj)

+ 4 - 13
GameClient/Assets/Game/HotUpdate/Views/Store/StoreView.cs

@@ -12,7 +12,7 @@ namespace GFGGame
     public class StoreView : BaseWindow
     {
         private UI_StoreUI _ui;
-        private ValueBarController _valueBarController;
+        // private ValueBarController _valueBarController;
         private List<List<string>> _arenaSubTab = new List<List<string>>();
         private int _curTabIndex = 0;
         private int _curSubTabIndex = 0;
@@ -20,12 +20,6 @@ namespace GFGGame
 
         public override void Dispose()
         {
-            if (_valueBarController != null)
-            {
-                _valueBarController.Dispose();
-                _valueBarController = null;
-            }
-
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -58,7 +52,6 @@ namespace GFGGame
                 _arenaSubTab.Add(new List<string>() { string.Format("第{0}赛季", i), i.ToString(), "StoreArenaView" });
             }
 
-            _valueBarController = new ValueBarController(_ui.m_valueBar);
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("sc_beijing");
 
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
@@ -75,12 +68,11 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            _valueBarController.OnShown();
             //this.viewData[functionId][subTabIndex]
-            string functionId = this.viewData == null ? "" : (this.viewData as object[])[0].ToString();
+            _curTabIndex = this.viewData == null ? ConstStoreTabId.STORE_CHARGE : (int)(this.viewData as object[])[0];
 
-            StoreTabCfg tabCfg = StoreTabCfgArray.Instance.GetCfgByfunctionId(functionId);
-            _curTabIndex = tabCfg == null ? 1 : tabCfg.index;
+            // StoreTabCfg tabCfg = StoreTabCfgArray.Instance.GetCfg(tabIndex);
+            // _curTabIndex = tabCfg == null ? 1 : tabCfg.index;
             _ui.m_comTab.m_c1.selectedIndex = _curTabIndex;
             _ui.m_comTab.target.scrollPane.SetPercX((float)(_curTabIndex - 1) / (float)StoreTabCfgArray.Instance.dataArray.Length, false);
 
@@ -96,7 +88,6 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
-            _valueBarController.OnHide();
             _ui.m_comTab.m_c1.selectedIndex = 0;
             _ui.m_listSubTab.selectedIndex = 0;
 

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png


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


BIN
GameClient/Assets/ResIn/UI/Store/Store_fui.bytes