zhaoyang 2 жил өмнө
parent
commit
af29ad2447

+ 11 - 11
FGUIProject/assets/LuckyBox/components/Component2.xml

@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="385,385">
-  <controller name="c1" exported="true" pages="0,,1,,2,,3,,4," selected="4"/>
+  <controller name="c1" exported="true" pages="0,,1,,2,,3,,4," selected="2"/>
   <displayList>
     <graph id="n19_e050" name="holder" xy="187,187" size="10,10" group="n9_v95q" type="rect">
-      <gearDisplay controller="c1" pages="1,2"/>
+      <gearDisplay controller="c1" pages="3,4"/>
     </graph>
     <image id="n10_v95q" name="n10" src="volstb2" fileName="imageNews/zx_wp_jin_bg.png" xy="42,57" pivot="0.5,0.5" group="n9_v95q">
-      <gearDisplay controller="c1" pages="0,4"/>
+      <gearDisplay controller="c1" pages="0"/>
     </image>
     <image id="n12_v95q" name="n12" src="volstay" fileName="imageNews/zx_wp_fen_bg.png" xy="98,117" pivot="0.5,0.5" group="n9_v95q">
-      <gearDisplay controller="c1" pages="3"/>
+      <gearDisplay controller="c1" pages="0"/>
     </image>
     <image id="n18_e050" name="n18" src="volstb8" fileName="imageNews/zx_wp_lan_diguang.png" xy="87,90" group="n9_v95q">
       <gearDisplay controller="c1" pages="2"/>
@@ -20,24 +20,24 @@
     <image id="n13_v95q" name="n13" src="e050tf5" fileName="imageNews/zx_wp_lan_grey.png" xy="88,94" pivot="0.5,0.5" group="n9_v95q">
       <gearDisplay controller="c1" pages="1"/>
     </image>
-    <loader id="n3_ga16" name="icon" xy="194,195" pivot="0.5,0.5" anchor="true" size="200,200" group="n9_v95q" aspect="true" url="ui://eg2y0ldpm9wm8v" align="center" vAlign="middle" fill="scale" shrinkOnly="true">
-      <gearSize controller="c1" pages="1,2,3,4" values="120,120,1,1|116,116,1,1|138,138,1,1|200,200,1,1" default="158,158,1,1"/>
+    <loader id="n3_ga16" name="icon" xy="194,195" pivot="0.5,0.5" anchor="true" size="100,100" group="n9_v95q" aspect="true" url="ui://eg2y0ldpm9wm8v" align="center" vAlign="middle" fill="scale" shrinkOnly="true">
+      <gearSize controller="c1" pages="1,2,3,4" values="98,98,1,1|100,100,1,1|138,138,1,1|200,200,1,1" default="158,158,1,1"/>
     </loader>
-    <loader id="n4_ga16" name="rarity" xy="253,76" pivot="0.5,0" size="42,96" group="n9_v95q" aspect="true" url="ui://eg2y0ldpo9ghtll" align="center" fill="scale">
+    <loader id="n4_ga16" name="rarity" xy="229,130" pivot="0.5,0" size="26,60" group="n9_v95q" aspect="true" url="ui://eg2y0ldpo9ghtll" align="center" fill="scale">
       <gearXY controller="c1" pages="1,2,3,4" values="230,131|229,130|224,109|253,76" default="272,68"/>
       <gearSize controller="c1" pages="1,2,3" values="26,59,1,1|26,60,1,1|38,88,1,1" default="42,96,1,1"/>
     </loader>
-    <image id="n7_pzq1" name="imgNew" src="volstb5" fileName="imageNews/zx_wp_jin_jiaobiao.png" xy="56,93" pivot="0.5,0.5" size="91,52" group="n9_v95q" aspect="true" visible="false">
+    <image id="n7_pzq1" name="imgNew" src="volstb5" fileName="imageNews/zx_wp_jin_jiaobiao.png" xy="108,137" pivot="0.5,0.5" size="63,36" group="n9_v95q" aspect="true" visible="false">
       <gearXY controller="c1" pages="1,2,3,4" values="108,137|108,137|90,121|56,93" default="76,99"/>
       <gearSize controller="c1" pages="1,2,3" values="63,36,1,1|63,36,1,1|77,44,1,1" default="91,52,1,1"/>
     </image>
-    <image id="n20_e050" name="n20" src="volstb9" fileName="imageNews/zx_wp_mingcheng_bg.png" xy="192,331" pivot="0.5,0" anchor="true" size="173,32" group="n9_v95q">
+    <image id="n20_e050" name="n20" src="volstb9" fileName="imageNews/zx_wp_mingcheng_bg.png" xy="192,281" pivot="0.5,0" anchor="true" size="133,32" group="n9_v95q">
       <relation target="n21_e050" sidePair="width-width,center-center,middle-middle"/>
     </image>
-    <text id="n21_e050" name="txtName" xy="195,347" pivot="0.5,0.5" anchor="true" size="136,39" group="n9_v95q" fontSize="28" color="#ffffff" align="center" letterSpacing="-2" text="孔雀东南飞">
+    <text id="n21_e050" name="txtName" xy="195,297" pivot="0.5,0.5" anchor="true" size="96,29" group="n9_v95q" fontSize="20" color="#ffffff" align="center" letterSpacing="-2" text="孔雀东南飞">
       <gearFontSize controller="c1" pages="4" values="28" default="20"/>
       <relation target="n3_ga16" sidePair="center-center,top-bottom"/>
     </text>
-    <group id="n9_v95q" name="n9" xy="42,57" size="300,310"/>
+    <group id="n9_v95q" name="n9" xy="42,57" size="300,270"/>
   </displayList>
 </component>

+ 20 - 5
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -57,6 +57,7 @@ namespace GFGGame
             }
             else
             {
+                _ui.m_c1.selectedIndex = 1;
                 for (int i = 0; i < _rewardList.Count; i++)
                 {
                     UpdateItem(_ui.target.GetChild("item" + i).asCom, i);
@@ -76,13 +77,14 @@ namespace GFGGame
 
             ItemData itemData = _rewardList[index];
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
-            item.m_comIcon.m_c1.selectedIndex = itemData.rarity;
+            item.m_comIcon.m_c1.selectedIndex = itemCfg.rarity;
             item.m_comIcon.m_txtName.text = itemCfg.name;
             item.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
-            if (itemData.rarity > 2)
+            RarityIconController.UpdateRarityIcon(item.m_comIcon.m_rarity, itemData.id, false);
+            if (itemCfg.rarity > 2)
             {
-                string resPath = ResPathUtil.GetViewEffectPath("ui_LuckyBox", itemData.rarity == ConstDressRarity.Rarity_TIANYI ? "CK_all_02" : "CK_all_01");
-                if (_effectIndex >= _gameobjects.Count)
+                string resPath = ResPathUtil.GetViewEffectPath("ui_LuckyBox", itemCfg.rarity == ConstDressRarity.Rarity_TIANYI ? "CK_all_01" : "CK_all_02");
+                if (_effectIndex > _gameobjects.Count)
                 {
                     GameObject gameObject = _gameobjects[_effectIndex];
                     GoWrapper wrapper = _wrappers[_effectIndex];
@@ -104,8 +106,21 @@ namespace GFGGame
                 if (count == 1 && i == index) isFirst = true;
             }
             item.m_comIcon.m_imgNew.visible = count == ItemDataManager.GetItemNum(itemData.id) && isFirst;
-
+            item.m_t0.Play();
+            if (item.target.data == null)
+            {
+                item.target.onClick.Add(ShowItemTips);
+            }
+            item.target.data = itemCfg.id;
             UI_LuckyBoxBonusShowItem.ProxyEnd();
         }
+
+        private void ShowItemTips(EventContext context)
+        {
+            GObject obj = context.sender as GObject;
+            int itemID = (int)obj.data;
+
+            GoodsItemTipsController.ShowItemTips(itemID);
+        }
     }
 }

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes