ソースを参照

限时抢购界面

何晓捷 2 年 前
コミット
15fd79878b

+ 25 - 0
FGUIProject/assets/EnduringGiftBox/RushSaleGiftBoxUI.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1080,1231">
+  <displayList>
+    <image id="n1_yjmk" name="n1" src="yjmk2j" fileName="images/xsqg_db.png" xy="1,0"/>
+    <image id="n0_yjmk" name="n0" src="yjmk2l" fileName="images/xsqg_lihui.png" xy="44,95"/>
+    <image id="n2_yjmk" name="n2" src="yjmk2i" fileName="images/wz_xsqg.png" xy="335,98"/>
+    <image id="n5_yjmk" name="n5" src="yjmk2m" fileName="images/xsqg_nr_db.png" xy="193,287"/>
+    <text id="n4_yjmk" name="n4" xy="363,279" size="283,65" fontSize="40" color="#fffbf5" align="center" autoSize="none" strokeColor="#d69546" text="体力限时礼包"/>
+    <image id="n6_yjmk" name="n6" src="yjmk2n" fileName="images/xsqg_sj_db.png" xy="639,288"/>
+    <text id="n7_yjmk" name="n7" xy="321,381" size="497,54" fontSize="30" color="#fff9ff" align="center" autoSize="none" text="限时体力大甩卖,走过路过别错过哦!"/>
+    <text id="n8_yjmk" name="n8" xy="680,288" size="207,48" fontSize="35" color="#fffbf5" align="center" autoSize="none" text="6天23分23秒"/>
+    <image id="n9_yjmk" name="n9" src="yjmk2k" fileName="images/xsqg_fy_an.png" xy="877,458"/>
+    <image id="n10_yjmk" name="n10" src="yjmk2o" fileName="images/xsqg_fy_an_2.png" xy="63,452"/>
+    <list id="n11_yjmk" name="n11" xy="344,449" size="425,203" layout="flow_vt" overflow="scroll" scroll="horizontal" colGap="50" defaultItem="ui://bdi1qe15yjmk2p" align="center">
+      <item/>
+      <item/>
+    </list>
+    <image id="n12_yjmk" name="n12" src="yjmk2b" fileName="images/xsqg_zsx.png" xy="302,674"/>
+    <text id="n13_yjmk" name="n13" xy="453,695" size="224,68" fontSize="34" color="#b8857b" align="center" vAlign="middle" autoSize="shrink" text="今日限购0/1"/>
+    <component id="n15_yjmk" name="n15" src="yjmk2q" fileName="components/BtnBuyPink.xml" xy="408,765"/>
+    <component id="n14_yjmk" name="comDiscount" src="yjmk2r" fileName="components/ComDiscount2.xml" xy="333,714"/>
+    <text id="n16_yjmk" name="n16" xy="379,859" size="380,46" fontSize="34" color="#b8857b" align="center" autoSize="shrink" text="可获得60充值经验"/>
+    <image id="n17_yjmk" name="n17" src="qqhz2" fileName="images/back.png" xy="502,1005"/>
+  </displayList>
+</component>

+ 4 - 0
FGUIProject/assets/EnduringGiftBox/SpecialOfferGiftBoxUI.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1080,1076">
+  <displayList/>
+</component>

+ 11 - 0
FGUIProject/assets/EnduringGiftBox/components/BtnBuyPink.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="316,83" extention="Button">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <displayList>
+    <image id="n4_yjmk" name="n4" src="qqhzl" fileName="images/cz_an_pink.png" xy="0,0" size="316,91" aspect="true"/>
+    <text id="n1_qqhz" name="txtNewPrice" xy="166,5" size="104,69" font="SourceHanSerifCN-SemiBold" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="300元"/>
+    <text id="n2_qqhz" name="txtOldPrice" xy="37,2" size="84,69" font="SourceHanSerifCN-SemiBold" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" strike="true" text="2000"/>
+    <loader id="n5_yjmk" name="loaIcon" xy="122,22" size="33,31" fill="scale" shrinkOnly="true"/>
+  </displayList>
+  <Button/>
+</component>

+ 8 - 0
FGUIProject/assets/EnduringGiftBox/components/ComDiscount2.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="120,109">
+  <displayList>
+    <image id="n4_yjmk" name="n4" src="yjmk2a" fileName="images/xsqg_zk_db.png" xy="0,0" size="120,109" aspect="true"/>
+    <text id="n1_qqhz" name="txtDiscountNum" xy="17,14" size="78,59" fontSize="44" color="#fffbf3" leading="0" letterSpacing="-2" autoSize="none" bold="true" text="1.3"/>
+    <text id="n2_qqhz" name="n2" xy="65,32" size="35,56" font="ui://eg2y0ldpa0cftks" fontSize="37" color="#fffceb" align="center" autoSize="none" shadowColor="#ffffff" shadowOffset="1,1" text="折"/>
+  </displayList>
+</component>

+ 7 - 0
FGUIProject/assets/EnduringGiftBox/components/ComRsGifBoxIconItem.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="150,203">
+  <displayList>
+    <component id="n3_yjmk" name="comRewardIconItem" src="qqhz1g" fileName="components/ComRewardIconItem.xml" xy="3,2" size="132,132" aspect="true" scale="1.09,1.09"/>
+    <text id="n1_yjmk" name="txtItemName" xy="6,138" size="143,56" fontSize="39" color="#a47e49" align="center" autoSize="none" text="体力"/>
+  </displayList>
+</component>

BIN
FGUIProject/assets/EnduringGiftBox/images/thlb_db.png


BIN
FGUIProject/assets/EnduringGiftBox/images/thlb_lihui.png


BIN
FGUIProject/assets/EnduringGiftBox/images/thlb_sj_db.png


BIN
FGUIProject/assets/EnduringGiftBox/images/wz_thlb.png


BIN
FGUIProject/assets/EnduringGiftBox/images/wz_tlxslb.png


BIN
FGUIProject/assets/EnduringGiftBox/images/wz_xsqg.png


BIN
FGUIProject/assets/EnduringGiftBox/images/xsqg_db.png


BIN
FGUIProject/assets/EnduringGiftBox/images/xsqg_fy_an.png


BIN
FGUIProject/assets/EnduringGiftBox/images/xsqg_fy_an_2.png


BIN
FGUIProject/assets/EnduringGiftBox/images/xsqg_lihui.png


BIN
FGUIProject/assets/EnduringGiftBox/images/xsqg_nr_db.png


BIN
FGUIProject/assets/EnduringGiftBox/images/xsqg_sj_db.png


BIN
FGUIProject/assets/EnduringGiftBox/images/xsqg_zk_db.png


BIN
FGUIProject/assets/EnduringGiftBox/images/xsqg_zsx.png


+ 19 - 0
FGUIProject/assets/EnduringGiftBox/package.xml

@@ -48,6 +48,25 @@
     <image id="qqhz25" name="tili.png" path="/images/"/>
     <component id="qqhz26" name="BnBack.xml" path="/components/" exported="true"/>
     <image id="yjmk27" name="tb_zk_red.png" path="/images/"/>
+    <component id="yjmk28" name="SpecialOfferGiftBoxUI.xml" path="/"/>
+    <component id="yjmk29" name="RushSaleGiftBoxUI.xml" path="/"/>
+    <image id="yjmk2a" name="xsqg_zk_db.png" path="/images/"/>
+    <image id="yjmk2b" name="xsqg_zsx.png" path="/images/"/>
+    <image id="yjmk2d" name="thlb_db.png" path="/images/"/>
+    <image id="yjmk2e" name="thlb_lihui.png" path="/images/"/>
+    <image id="yjmk2f" name="thlb_sj_db.png" path="/images/"/>
+    <image id="yjmk2g" name="wz_thlb.png" path="/images/"/>
+    <image id="yjmk2h" name="wz_tlxslb.png" path="/images/"/>
+    <image id="yjmk2i" name="wz_xsqg.png" path="/images/"/>
+    <image id="yjmk2j" name="xsqg_db.png" path="/images/"/>
+    <image id="yjmk2k" name="xsqg_fy_an.png" path="/images/"/>
+    <image id="yjmk2l" name="xsqg_lihui.png" path="/images/"/>
+    <image id="yjmk2m" name="xsqg_nr_db.png" path="/images/"/>
+    <image id="yjmk2n" name="xsqg_sj_db.png" path="/images/"/>
+    <image id="yjmk2o" name="xsqg_fy_an_2.png" path="/images/"/>
+    <component id="yjmk2p" name="ComRsGifBoxIconItem.xml" path="/components/" exported="true"/>
+    <component id="yjmk2q" name="BtnBuyPink.xml" path="/components/" exported="true"/>
+    <component id="yjmk2r" name="ComDiscount2.xml" path="/components/" exported="true"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/EnduringGiftBox" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 11 - 3
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -273,8 +273,14 @@ namespace GFGGame
                 item.m_comLeftGiftBox.m_comGouMaiGetText.m_loaIcon.url = ResPathUtil.GetIconPath(getItemCfg);
                 item.m_comLeftGiftBox.m_comGouMaiGetText.m_txtGetGold.text = itemArr[1].ToString();
                 item.m_txtUrc.text = string.Format("每周限购{0}/{1}", remainBuyNum, shopCfg.maxBuyNum);
-                item.m_txtLrc.text = string.Format("剩余{0}天",
-                    EnduringGiftBoxDataManager.Instance.GetItemRebateDay(itemCfg.id));
+                int rebateDay = EnduringGiftBoxDataManager.Instance.GetItemRebateDay(itemCfg.id);
+                string mTxtLrc = string.Empty;
+                if (rebateDay != 0)
+                {
+                    mTxtLrc = string.Format("剩余{0}天", rebateDay);
+                }
+
+                item.m_txtLrc.text = mTxtLrc;
                 item.m_txtWeekPrompt.visible = true;
                 item.m_txtWeekPrompt.text =
                     string.Format("连续{0}天每日获得",
@@ -324,7 +330,9 @@ namespace GFGGame
                     }
                 }
             }
-
+            
+            item.m_icoWeekPromptTag.onClick.Add(RuleController.ShowRuleView);
+            item.m_icoWeekPromptTag.data = 300013;
             //领取按钮点击事件
             item.m_btnCurReceive.target.onClick.Add(OnBtnCurReceiveClick);
             //购买按钮点击事件