zhaoyang 3 роки тому
батько
коміт
304075887e

+ 1 - 1
FGUIProject/assets/RechargeStore/GiftBagBuyUI.xml

@@ -7,7 +7,7 @@
     <text id="n1_10not" name="txtName" xy="354,31" pivot="0.5,0" size="228,74" fontSize="56" color="#8f6e30" text="礼包礼包"/>
     <loader id="n2_10not" name="loaIcon" xy="137,273" pivot="0.5,0.5" size="50,50" autoSize="true"/>
     <text id="n3_10not" name="txtLimit" xy="45,420" pivot="0.5,0" size="251,46" fontSize="34" color="#a3926c" align="center" leading="-5" letterSpacing="-2" ubb="true" text="每日限购(0/1)"/>
-    <list id="n4_10not" name="list" xy="307,212" size="618,197" layout="row" overflow="scroll" colGap="10" defaultItem="ui://eg2y0ldpj48o98" align="center">
+    <list id="n4_10not" name="list" xy="307,212" size="618,197" layout="row" overflow="hidden" colGap="10" defaultItem="ui://eg2y0ldpj48o98" align="center">
       <item/>
       <item/>
       <item/>

+ 6 - 4
FGUIProject/assets/RechargeStore/components/Component2.xml

@@ -2,16 +2,18 @@
 <component size="264,79">
   <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
-    <loader id="n15_iftf" name="loaIcon" xy="78,19" size="60,60" group="n17_iftf" url="ui://eg2y0ldpq08x4" autoSize="true">
+    <loader id="n15_iftf" name="loaIcon" xy="82,19" size="60,60" group="n17_iftf" url="ui://eg2y0ldpq08x4" autoSize="true">
       <gearDisplay controller="c1" pages="0"/>
     </loader>
     <text id="n16_iftf" name="n16" xy="82,17" size="52,64" group="n17_iftf" fontSize="48" color="#8b6540" text="¥">
       <gearDisplay controller="c1" pages="1"/>
     </text>
-    <group id="n17_iftf" name="n17" xy="78,17" size="60,64" group="n19_iftf" advanced="true"/>
-    <text id="n18_iftf" name="txtTitle" xy="138,17" size="64,64" group="n19_iftf" fontSize="48" color="#8b6540" align="center" vAlign="middle" vars="true" singleLine="true" text="60">
+    <group id="n17_iftf" name="n17" xy="82,17" size="52,64" group="n19_iftf" advanced="true" layout="hz" excludeInvisibles="true"/>
+    <text id="n18_iftf" name="txtTitle" xy="134,17" size="64,64" group="n19_iftf" fontSize="48" color="#8b6540" align="center" vAlign="middle" vars="true" singleLine="true" text="60">
       <relation target="" sidePair="width-width,height-height"/>
     </text>
-    <group id="n19_iftf" name="n19" xy="78,17" size="124,64" advanced="true" layout="hz" excludeInvisibles="true"/>
+    <group id="n19_iftf" name="n19" xy="82,17" size="116,64" advanced="true" layout="hz" excludeInvisibles="true">
+      <relation target="" sidePair="center-center"/>
+    </group>
   </displayList>
 </component>

+ 1 - 3
FGUIProject/assets/RechargeStore/components/StoreListItem.xml

@@ -16,10 +16,8 @@
     </text>
     <component id="n14_d4iw" name="btnBuy" src="iftftaf" fileName="components/Component2.xml" xy="18,420" size="265,80">
       <gearDisplay controller="c1" pages="0"/>
+      <relation target="" sidePair="center-center"/>
     </component>
-    <loader id="n21_t8xr" name="loaBuy" xy="18,433" size="265,80">
-      <gearDisplay controller="c1" pages="1"/>
-    </loader>
     <text id="n18_dmsi" name="txtDesc" xy="6,380" pivot="0.5,0" size="290,49" font="ui://eg2y0ldpk1kha2" fontSize="36" color="#bb674e" letterSpacing="-2" text="首充赠送+6000钻石"/>
   </displayList>
 </component>

+ 0 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/RechargeStore/UI_StoreListItem.cs

@@ -12,7 +12,6 @@ namespace UI.RechargeStore
         public GLoader m_icon;
         public GTextField m_txtName;
         public UI_Component2 m_btnBuy;
-        public GLoader m_loaBuy;
         public GTextField m_txtDesc;
         public const string URL = "ui://vlgobc15d4iwr";
         public const string PACKAGE_NAME = "RechargeStore";
@@ -66,7 +65,6 @@ namespace UI.RechargeStore
             m_icon = (GLoader)comp.GetChild("icon");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_btnBuy = (UI_Component2)UI_Component2.Create(comp.GetChild("btnBuy"));
-            m_loaBuy = (GLoader)comp.GetChild("loaBuy");
             m_txtDesc = (GTextField)comp.GetChild("txtDesc");
         }
         public void Dispose(bool disposeTarget = false)
@@ -77,7 +75,6 @@ namespace UI.RechargeStore
             m_txtName = null;
             m_btnBuy.Dispose();
             m_btnBuy = null;
-            m_loaBuy = null;
             m_txtDesc = null;
             if(disposeTarget && target != null)
             {

+ 6 - 10
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/RechargeStoreView.cs

@@ -115,14 +115,14 @@ namespace GFGGame
             UI_StoreListItem item = UI_StoreListItem.Proxy(obj);
             item.m_btnBuy.m_c1.selectedIndex = 1;
             item.m_btnBuy.m_txtTitle.text = itemData.price.ToString();
-            if (item.m_btnBuy.target.data == null)
+            if (item.target.data == null)
             {
-                item.m_btnBuy.target.onClick.Add(() =>
+                item.target.onClick.Add(() =>
                 {
                     RechargeSProxy.ReqRecharge(itemData.id).Coroutine();
                 });
             }
-            item.m_btnBuy.target.data = index;
+            item.target.data = index;
             item.m_txtName.text = string.Format("{0}{1}", itemData.itemNum, itemData.name);
             item.m_txtDesc.text = string.Format("首充赠送+{0}{1}", itemData.itemNum, itemData.name);
             bool isDouble = RechargeDataManager.Instance.GetRechargeBuyNumById(itemData.id) < itemData.doubleTimes;
@@ -221,24 +221,20 @@ namespace GFGGame
             item.m_btnBuy.m_txtTitle.text = cfg.costNum.ToString();
             bool isSellOut = cfg.maxLimit > 0 && cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id) <= 0;
             item.m_c1.selectedIndex = isSellOut ? 1 : 0;
-            if (item.m_btnBuy.target.data == null)
+            if (item.target.data == null)
             {
-                item.m_loaBuy.onClick.Add(() =>
+                item.target.onClick.Add(() =>
                 {
                     if (isSellOut)
                     {
                         PromptController.Instance.ShowFloatTextPrompt("已售罄");
                         return;
                     }
-                });
-                item.m_btnBuy.target.onClick.Add(() =>
-                {
-                    if (isSellOut) return;
                     ViewManager.Show<ItemExchangeView>(cfg.id);
                 });
             }
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemId);
-            item.m_btnBuy.target.data = cfg.id;
+            item.target.data = cfg.id;
             item.m_btnBuy.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(cfg.costId).res);
             item.m_txtName.text = itemCfg.name;
             item.m_txtDesc.text = string.Format("剩余:{0}", cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id));

BIN
GameClient/Assets/ResIn/UI/RechargeStore/RechargeStore_fui.bytes