Browse Source

活动item方形底框改成圆形

huangxiaoyue 1 năm trước cách đây
mục cha
commit
01002635e2

+ 0 - 95
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRewardIconItem.cs

@@ -1,95 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.EnduringGiftBox
-{
-    public partial class UI_ComRewardIconItem
-    {
-        public GComponent target;
-        public Controller m_c1;
-        public GImage m_bagYellow;
-        public GImage m_bagBlue;
-        public GLoader m_loaIcon;
-        public GImage m_bagYellowEx;
-        public GImage m_bagBlueEx;
-        public GTextField m_num;
-        public GGraph m_holderItem;
-        public Transition m_t0;
-        public const string URL = "ui://bdi1qe15qqhz1g";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
-        public const string RES_NAME = "ComRewardIconItem";
-        private static UI_ComRewardIconItem _proxy;
-
-        public static UI_ComRewardIconItem Create(GObject gObject = null)
-        {
-            var ui = new UI_ComRewardIconItem();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_ComRewardIconItem Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComRewardIconItem();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_c1 = comp.GetController("c1");
-            m_bagYellow = (GImage)comp.GetChild("bagYellow");
-            m_bagBlue = (GImage)comp.GetChild("bagBlue");
-            m_loaIcon = (GLoader)comp.GetChild("loaIcon");
-            m_bagYellowEx = (GImage)comp.GetChild("bagYellowEx");
-            m_bagBlueEx = (GImage)comp.GetChild("bagBlueEx");
-            m_num = (GTextField)comp.GetChild("num");
-            m_holderItem = (GGraph)comp.GetChild("holderItem");
-            m_t0 = comp.GetTransition("t0");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_c1 = null;
-            m_bagYellow = null;
-            m_bagBlue = null;
-            m_loaIcon = null;
-            m_bagYellowEx = null;
-            m_bagBlueEx = null;
-            m_num = null;
-            m_holderItem = null;
-            m_t0 = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRewardIconItem.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 847d81c746104fd478d684f93e691f40
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 81
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRsGifBoxIconItem.cs

@@ -1,81 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.EnduringGiftBox
-{
-    public partial class UI_ComRsGifBoxIconItem
-    {
-        public GComponent target;
-        public UI_ComRewardIconItem m_comRewardIconItem;
-        public GTextField m_txtItemName;
-        public GGraph m_holderItem;
-        public Transition m_t1;
-        public const string URL = "ui://bdi1qe15yjmk2p";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
-        public const string RES_NAME = "ComRsGifBoxIconItem";
-        private static UI_ComRsGifBoxIconItem _proxy;
-
-        public static UI_ComRsGifBoxIconItem Create(GObject gObject = null)
-        {
-            var ui = new UI_ComRsGifBoxIconItem();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_ComRsGifBoxIconItem Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComRsGifBoxIconItem();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_comRewardIconItem = (UI_ComRewardIconItem)UI_ComRewardIconItem.Create(comp.GetChild("comRewardIconItem"));
-            m_txtItemName = (GTextField)comp.GetChild("txtItemName");
-            m_holderItem = (GGraph)comp.GetChild("holderItem");
-            m_t1 = comp.GetTransition("t1");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_comRewardIconItem.Dispose();
-            m_comRewardIconItem = null;
-            m_txtItemName = null;
-            m_holderItem = null;
-            m_t1 = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRsGifBoxIconItem.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 7646dc5359481fd46871b46ecf90a566
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 1
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaDressInfoView.cs

@@ -245,7 +245,6 @@ namespace GFGGame
             GoodsItemTipsController.ShowItemTips(itemId);
         }
 
-
         private void CheckGuide(object param)
         {
             if (GuideDataManager.IsGuideFinish(ConstGuideId.ARENA_OPEN) <= 0)

+ 28 - 26
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using ET;
 using FairyGUI;
+using UI.CommonGame;
 using UI.EnduringGiftBox;
 using UnityEngine;
 
@@ -329,6 +330,7 @@ namespace GFGGame
 
             item.m_list.data = shopCfg;
             item.m_list.itemRenderer = ChildListItemRender;
+            item.m_list.onClickItem.Add(OnListSelectorItemClick);
             item.m_list.numItems = numItems;
         }
 
@@ -393,7 +395,7 @@ namespace GFGGame
         // ReSharper disable Unity.PerformanceAnalysis
         private void ChildListItemRender(int index, GObject obj)
         {
-            UI_ComRewardIconItem uiItemChild = UI_ComRewardIconItem.Proxy(obj);
+            UI_ComItem uiItemChild = UI_ComItem.Proxy(obj);
             var shopCfg = uiItemChild.target.parent.data as ShopCfg;
             var itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
             // uiItemChild.m_showRreceives.visible = false;
@@ -402,46 +404,46 @@ namespace GFGGame
             int[][] result;
             if (shopCfg.refreshType == RefreshType.DAY)
             {
-                result = itemCfg.itemsArr;
-                uiItemChild.m_bagYellow.visible = false;
-                uiItemChild.m_bagBlue.visible = true;
-                uiItemChild.m_bagYellowEx.visible = false;
-                uiItemChild.m_bagBlueEx.visible = true;
+                    result = itemCfg.itemsArr;
+                //    uiItemChild.m_bagYellow.visible = false;
+                //    uiItemChild.m_bagBlue.visible = true;
+                //    uiItemChild.m_bagYellowEx.visible = false;
+                //    uiItemChild.m_bagBlueEx.visible = true;
             }
             else
             {
                 //周刷
                 result = itemCfg.param1Arr;
-                uiItemChild.m_bagYellow.visible = true;
-                uiItemChild.m_bagBlue.visible = false;
-                uiItemChild.m_bagYellowEx.visible = true;
-                uiItemChild.m_bagBlueEx.visible = false;
-            }
+            //    uiItemChild.m_bagYellow.visible = true;
+            //    uiItemChild.m_bagBlue.visible = false;
+            //    uiItemChild.m_bagYellowEx.visible = true;
+            //    uiItemChild.m_bagBlueEx.visible = false;
+        }
 
-            // if (curGiftBoxState == EnduringGiftBoxBuyStatus.YesGet)
-            // {
-            //     uiItemChild.m_showRreceives.visible = true;
-            // }
-            // else if (curGiftBoxState == EnduringGiftBoxBuyStatus.NoGet)
-            // {
-            //     uiItemChild.m_showRreceives.visible = false;
-            // }
+        // if (curGiftBoxState == EnduringGiftBoxBuyStatus.YesGet)
+        // {
+        //     uiItemChild.m_showRreceives.visible = true;
+        // }
+        // else if (curGiftBoxState == EnduringGiftBoxBuyStatus.NoGet)
+        // {
+        //     uiItemChild.m_showRreceives.visible = false;
+        // }
 
             var itemArr = result[index];
             var itemCfgChild = ItemCfgArray.Instance.GetCfg(itemArr[0]);
-            uiItemChild.m_loaIcon.onClick.Add(OnListSelectorItemClick);
-            uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
-            uiItemChild.m_num.text = itemArr[1].ToString();
             uiItemChild.target.data = itemCfgChild;
-            UI_ComRewardIconItem.ProxyEnd();
+            uiItemChild.m_txtCount.text = itemArr[1].ToString();
+            uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
+            uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;
+
+            UI_ComItem.ProxyEnd();
         }
 
         //弹出物品详细描述框
         private void OnListSelectorItemClick(EventContext context)
         {
-            GObject sender = context.sender as GObject;
-            GObject obj = sender.parent;
-            ItemCfg itemCfg = obj.data as ItemCfg;
+            GComponent item = context.data as GComponent;
+            ItemCfg itemCfg = item.data as ItemCfg;
             GoodsItemTipsController.ShowItemTips(itemCfg.id);
         }
 

+ 16 - 18
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/RushSaleGiftBoxView.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using ET;
 using FairyGUI;
+using UI.CommonGame;
 using UI.EnduringGiftBox;
 using UnityEngine;
 
@@ -266,29 +267,26 @@ namespace GFGGame
 
         private void ListItemRender(int index, GObject obj)
         {
-            UI_ComRsGifBoxIconItem uiItem = UI_ComRsGifBoxIconItem.Proxy(obj);
+            UI_ComItem uiItem = UI_ComItem.Proxy(obj);
             var boxItemCfg = uiItem.target.parent.data as ItemCfg;
             var itemKv = boxItemCfg.itemsArr[index];
 
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemKv[0]);
-            uiItem.m_txtItemName.text = itemCfg.name;
+            //uiItem.m_txtName.text = itemCfg.name;
             uiItem.target.data = itemCfg;
-            uiItem.m_comRewardIconItem.m_bagBlue.visible = false;
-            uiItem.m_comRewardIconItem.m_bagBlueEx.visible = false;
-            uiItem.m_comRewardIconItem.m_num.text = itemKv[1].ToString();
-            uiItem.m_comRewardIconItem.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
-            uiItem.m_comRewardIconItem.target.onClick.Add(OnListSelectorItemClick);
-
-            if (!_graphList.Contains(uiItem.m_holderItem))
-            {
-                EffectUI _effectUI = EffectUIPool.CreateEffectUI(uiItem.m_holderItem, "ui_Activity", "Limite_kuang");
-
-                _graphList.Add(uiItem.m_holderItem);
-                _effectUIList.Add(_effectUI);
-            }
-
-            uiItem.m_t1.Play();
-            UI_RushSaleGiftBoxUI.ProxyEnd();
+            uiItem.m_txtCount.text = itemKv[1].ToString();
+            uiItem.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
+            uiItem.target.onClick.Add(OnListSelectorItemClick);
+
+            //if (!_graphList.Contains(uiItem.m_holderReware))
+            //{
+            //    EffectUI _effectUI = EffectUIPool.CreateEffectUI(uiItem.m_holderReware, "ui_Activity", "Limite_kuang");
+            //    _graphList.Add(uiItem.m_holderReware);
+            //    _effectUIList.Add(_effectUI);
+            //}
+
+            //uiItem.m_t1.Play();
+            UI_ComItem.ProxyEnd();
         }
 
         private void UpViewNone()

+ 19 - 18
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using ET;
 using FairyGUI;
+using UI.CommonGame;
 using UI.EnduringGiftBox;
 using UnityEngine;
 
@@ -272,13 +273,14 @@ namespace GFGGame
 
             //子列表
             uiItem.m_list.itemRenderer = ChildListItemRender;
+            uiItem.m_list.onClickItem.Add(OnListSelectorItemClick);
             uiItem.m_list.numItems = shopItemCfg.itemsArr.Length;
             uiItem.m_list.visible = true;
         }
 
         private void ChildListItemRender(int index, GObject obj)
         {
-            UI_ComRewardIconItem uiItemChild = UI_ComRewardIconItem.Proxy(obj);
+            UI_ComItem uiItemChild = UI_ComItem.Proxy(obj);
             var shopCfg = uiItemChild.target.parent.parent.data as ShopCfg;
             var itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
 
@@ -286,10 +288,10 @@ namespace GFGGame
             // if (shopCfg.refreshType == RefreshType.DAY)
             // {
             result = itemCfg.itemsArr;
-            uiItemChild.m_bagYellow.visible = false;
-            uiItemChild.m_bagBlue.visible = true;
-            uiItemChild.m_bagYellowEx.visible = false;
-            uiItemChild.m_bagBlueEx.visible = true;
+            //uiItemChild.m_bagYellow.visible = false;
+            //uiItemChild.m_bagBlue.visible = true;
+            //uiItemChild.m_bagYellowEx.visible = false;
+            //uiItemChild.m_bagBlueEx.visible = true;
             // }
             // else
             // {
@@ -303,29 +305,28 @@ namespace GFGGame
 
             var itemArr = result[index];
             var itemCfgChild = ItemCfgArray.Instance.GetCfg(itemArr[0]);
-            uiItemChild.m_loaIcon.onClick.Add(OnListSelectorItemClick);
             uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
-            uiItemChild.m_num.text = itemArr[1].ToString();
+            uiItemChild.m_txtCount.text = itemArr[1].ToString();
             uiItemChild.target.data = itemCfgChild;
+            uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;
 
-            if (!_graphList.Contains(uiItemChild.m_holderItem))
-            {
-                EffectUI _effectUI = EffectUIPool.CreateEffectUI(uiItemChild.m_holderItem, "ui_Activity", "Prefer_kuang");
-                _graphList.Add(uiItemChild.m_holderItem);
-                _effectUIList.Add(_effectUI);
-            }
+            //if (!_graphList.Contains(uiItemChild.m_holderItem))
+            //{
+            //    EffectUI _effectUI = EffectUIPool.CreateEffectUI(uiItemChild.m_holderItem, "ui_Activity", "Prefer_kuang");
+            //    _graphList.Add(uiItemChild.m_holderItem);
+            //    _effectUIList.Add(_effectUI);
+            //}
 
-            uiItemChild.m_t0.Play();
+            //uiItemChild.m_t0.Play();
 
-            UI_ComRewardIconItem.ProxyEnd();
+            UI_ComItem.ProxyEnd();
         }
 
         //弹出物品详细描述框
         private void OnListSelectorItemClick(EventContext context)
         {
-            GObject sender = context.sender as GObject;
-            GObject obj = sender.parent;
-            ItemCfg itemCfg = obj.data as ItemCfg;
+            GComponent item = context.data as GComponent;
+            ItemCfg itemCfg = item.data as ItemCfg;
             GoodsItemTipsController.ShowItemTips(itemCfg.id);
         }
 

BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0.png


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_fui.bytes