Browse Source

月卡限购特权

zhaoyang 2 years ago
parent
commit
84fda9e974

+ 4 - 4
FGUIProject/assets/CommonGame/components/ComCostCurrencyWithHas.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="280,42">
   <displayList>
-    <text id="n2_ojlz" name="n2" xy="7,1" size="65,42" group="n12_nasr" fontSize="30" color="#ebdfcb" autoSize="none" text="消耗"/>
-    <loader id="n1_ojlz" name="loaIcon" xy="82,-9" size="60,60" group="n12_nasr" url="ui://eg2y0ldpq08x3" autoSize="true"/>
-    <text id="n11_r9ri" name="txtCount" xy="152,1" size="121,41" group="n12_nasr" fontSize="30" color="#fdeed4" vAlign="middle" ubb="true" autoClearText="true" text="999/999"/>
-    <group id="n12_nasr" name="n12" xy="7,-9" size="266,60" advanced="true" layout="hz" colGap="10" excludeInvisibles="true">
+    <text id="n2_ojlz" name="n2" xy="16,1" size="65,42" group="n12_nasr" fontSize="30" color="#9f815f" autoSize="none" text="消耗"/>
+    <loader id="n1_ojlz" name="loaIcon" xy="91,-9" size="60,60" group="n12_nasr" url="ui://eg2y0ldpq08x3" autoSize="true"/>
+    <text id="n11_r9ri" name="txtCount" xy="161,1" size="103,41" group="n12_nasr" fontSize="30" color="#9f815f" vAlign="middle" ubb="true" autoClearText="true" text="999/999"/>
+    <group id="n12_nasr" name="n12" xy="16,-9" size="248,60" advanced="true" layout="hz" colGap="10" excludeInvisibles="true">
       <relation target="" sidePair="center-center"/>
     </group>
   </displayList>

+ 5 - 3
FGUIProject/assets/Studio/StudioBuyNumUI.xml

@@ -4,9 +4,11 @@
   <displayList>
     <component id="n26_eiwu" name="loaBg" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,0" size="962,574"/>
     <image id="n32_kqhd" name="n32" src="9cth8y" fileName="imagesExport/tctc_xiant_1.png" pkg="eg2y0ldp" xy="57,120"/>
-    <text id="n30_n3xh" name="txtTitle" xy="432,30" pivot="0.5,0" size="98,64" fontSize="48" color="#9b7853" text="提示"/>
-    <text id="n29_n3xh" name="txtTips" xy="312,150" pivot="0.5,0" size="337,51" fontSize="38" color="#917961" text="请选择获取次数方式"/>
-    <text id="n31_n3xh" name="txtNum" xy="337,220" pivot="0.5,0" size="287,44" fontSize="32" color="#917961" text="(今日已兑换0/10次)"/>
+    <text id="n30_n3xh" name="txtTitle" xy="431,30" pivot="0.5,0" size="100,64" fontSize="48" color="#9b7853" text="提示"/>
+    <text id="n29_n3xh" name="txtTips" xy="299,150" pivot="0.5,0" size="363,52" fontSize="38" color="#917961" text="  以下途径可增加次数"/>
+    <text id="n31_n3xh" name="txtNum0" xy="289,220" pivot="0.5,0" size="383,44" group="n37_qik1" fontSize="32" color="#917961" text=" 1.金卡+X次,黑金卡+X次"/>
+    <text id="n36_qik1" name="txtNum1" xy="267,269" pivot="0.5,0" size="428,44" group="n37_qik1" fontSize="32" color="#917961" text="2.道具兑换(今日已兑换0/10次)"/>
+    <group id="n37_qik1" name="n37" xy="267,220" size="428,93" advanced="true" layout="vt" lineGap="5" excludeInvisibles="true"/>
     <component id="n27_n3xh" name="comCostItem" src="ojlz61" fileName="components/ComCostCurrencyWithHas.xml" pkg="eg2y0ldp" xy="335,364" group="n33_f2bf"/>
     <component id="n7_hinb" name="btnExchange" src="r9ritjh" fileName="components/Button18.xml" pkg="mk0fwx0x" xy="310,420" group="n33_f2bf">
       <Button title="兑换"/>

+ 6 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_StudioBuyNumUI.cs

@@ -11,7 +11,8 @@ namespace UI.Studio
         public GComponent m_loaBg;
         public GTextField m_txtTitle;
         public GTextField m_txtTips;
-        public GTextField m_txtNum;
+        public GTextField m_txtNum0;
+        public GTextField m_txtNum1;
         public GComponent m_comCostItem;
         public GButton m_btnExchange;
         public GComponent m_comCostCurrent;
@@ -67,7 +68,8 @@ namespace UI.Studio
             m_loaBg = (GComponent)comp.GetChild("loaBg");
             m_txtTitle = (GTextField)comp.GetChild("txtTitle");
             m_txtTips = (GTextField)comp.GetChild("txtTips");
-            m_txtNum = (GTextField)comp.GetChild("txtNum");
+            m_txtNum0 = (GTextField)comp.GetChild("txtNum0");
+            m_txtNum1 = (GTextField)comp.GetChild("txtNum1");
             m_comCostItem = (GComponent)comp.GetChild("comCostItem");
             m_btnExchange = (GButton)comp.GetChild("btnExchange");
             m_comCostCurrent = (GComponent)comp.GetChild("comCostCurrent");
@@ -79,7 +81,8 @@ namespace UI.Studio
             m_loaBg = null;
             m_txtTitle = null;
             m_txtTips = null;
-            m_txtNum = null;
+            m_txtNum0 = null;
+            m_txtNum1 = null;
             m_comCostItem = null;
             m_btnExchange = null;
             m_comCostCurrent = null;

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

@@ -61,7 +61,23 @@ namespace GFGGame
         private void UpdateView()
         {
             _ui.m_c1.selectedIndex = 0;
-            _ui.m_txtNum.text = string.Format("(今天已兑换{0}/{1}次)", _limitData.BuyTimes, _limitCfg.buyNum);
+            _ui.m_txtNum1.visible = false;
+            _ui.m_txtNum0.text = string.Format("(今天已兑换{0}/{1}次)", _limitData.BuyTimes, _limitCfg.buyNum);
+
+            List<MonthlyCardPrivilegeCfg> privilegeCfgs = MonthlyCardPrivilegeCfgArray.Instance.GetCfgsByparamsType(1);
+            for (int i = 0; i < privilegeCfgs.Count; i++)
+            {
+                if (privilegeCfgs[i].paramsArr[0] == _limitId)
+                {
+                    _ui.m_txtNum1.visible = true;
+                    string str0 = privilegeCfgs[i].value1Arr[0] > 0 ? string.Format("金卡+{0}次", privilegeCfgs[i].value1Arr[0]) : "";
+                    string str1 = privilegeCfgs[i].value2Arr[0] > 0 ? string.Format("黑金卡+{0}次", privilegeCfgs[i].value2Arr[0]) : "";
+                    _ui.m_txtNum0.text = string.Format("1.{0}{1}{2}", str0, !string.IsNullOrEmpty(str0) && !string.IsNullOrEmpty(str1) ? "," : "", str1);
+                    _ui.m_txtNum1.text = string.Format("2.道具兑换(今天已兑换{0}/{1}次)", _limitData.BuyTimes, _limitCfg.buyNum);
+                    break;
+                }
+            }
+
 
             ItemUtil.UpdateItemNumAndNeedNum(_ui.m_comCostItem, _limitCfg.itemID, _limitCfg.itemNum, true);
 
@@ -100,7 +116,7 @@ namespace GFGGame
         }
         private void OnLimitChanged(EventContext context = null)
         {
-            if((int)context.data != _limitId)
+            if ((int)context.data != _limitId)
             {
                 return;
             }

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


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes