Browse Source

商城兑换外显兑换数量

zhaoyang 2 years ago
parent
commit
00f9b417f6

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

@@ -19,5 +19,6 @@
       <relation target="" sidePair="center-center"/>
       <relation target="" sidePair="center-center"/>
     </component>
     </component>
     <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钻石"/>
     <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钻石"/>
+    <text id="n21_ysx9" name="txtExchangeCount" xy="202,334" pivot="1,0" size="69,49" fontSize="36" color="#fbf6eb" vars="true" strokeColor="#967e64" strokeSize="2" text="x{count=20}"/>
   </displayList>
   </displayList>
 </component>
 </component>

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

@@ -13,6 +13,7 @@ namespace UI.RechargeStore
         public GTextField m_txtName;
         public GTextField m_txtName;
         public UI_Component2 m_btnBuy;
         public UI_Component2 m_btnBuy;
         public GTextField m_txtDesc;
         public GTextField m_txtDesc;
+        public GTextField m_txtExchangeCount;
         public const string URL = "ui://vlgobc15d4iwr";
         public const string URL = "ui://vlgobc15d4iwr";
         public const string PACKAGE_NAME = "RechargeStore";
         public const string PACKAGE_NAME = "RechargeStore";
         public const string RES_NAME = "StoreListItem";
         public const string RES_NAME = "StoreListItem";
@@ -66,6 +67,7 @@ namespace UI.RechargeStore
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_btnBuy = (UI_Component2)UI_Component2.Create(comp.GetChild("btnBuy"));
             m_btnBuy = (UI_Component2)UI_Component2.Create(comp.GetChild("btnBuy"));
             m_txtDesc = (GTextField)comp.GetChild("txtDesc");
             m_txtDesc = (GTextField)comp.GetChild("txtDesc");
+            m_txtExchangeCount = (GTextField)comp.GetChild("txtExchangeCount");
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
@@ -76,6 +78,7 @@ namespace UI.RechargeStore
             m_btnBuy.Dispose();
             m_btnBuy.Dispose();
             m_btnBuy = null;
             m_btnBuy = null;
             m_txtDesc = null;
             m_txtDesc = null;
+            m_txtExchangeCount = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {
                 target.RemoveFromParent();
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/RechargeStore/RechargeStoreView.cs

@@ -136,6 +136,7 @@ namespace GFGGame
         {
         {
             RechargeCfg itemData = RechargeCfgArray.Instance.dataArray[index];
             RechargeCfg itemData = RechargeCfgArray.Instance.dataArray[index];
             UI_StoreListItem item = UI_StoreListItem.Proxy(obj);
             UI_StoreListItem item = UI_StoreListItem.Proxy(obj);
+            item.m_txtExchangeCount.visible = false;
             item.m_btnBuy.m_c1.selectedIndex = 1;
             item.m_btnBuy.m_c1.selectedIndex = 1;
             item.m_btnBuy.m_txtTitle.text = itemData.price.ToString();
             item.m_btnBuy.m_txtTitle.text = itemData.price.ToString();
             if (item.target.data == null)
             if (item.target.data == null)
@@ -256,6 +257,8 @@ namespace GFGGame
             UI_StoreListItem item = UI_StoreListItem.Proxy(obj);
             UI_StoreListItem item = UI_StoreListItem.Proxy(obj);
             item.m_btnBuy.m_c1.selectedIndex = 0;
             item.m_btnBuy.m_c1.selectedIndex = 0;
             item.m_btnBuy.m_txtTitle.text = cfg.costNum.ToString();
             item.m_btnBuy.m_txtTitle.text = cfg.costNum.ToString();
+            item.m_txtExchangeCount.text = string.Format("x{0}", cfg.num);
+            // item.m_txtExchangeCount.visible = cfg.num > 1;
             bool isSellOut = cfg.maxLimit > 0 && cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id) <= 0;
             bool isSellOut = cfg.maxLimit > 0 && cfg.maxLimit - RechargeDataManager.Instance.GetExchangeBuyNumById(cfg.id) <= 0;
             item.m_c1.selectedIndex = isSellOut ? 1 : 0;
             item.m_c1.selectedIndex = isSellOut ? 1 : 0;
             if (item.target.data == null)
             if (item.target.data == null)

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