何晓捷 2 роки тому
батько
коміт
11f4d1183d

+ 0 - 1
FGUIProject/assets/Bag/GiftBoxSelectorUI.xml

@@ -27,5 +27,4 @@
     <component id="n30_cu9w" name="btnSub" src="cu9wtme" fileName="components/BtnSub.xml" xy="348,845" group="n27_v5no"/>
     <group id="n27_v5no" name="n27" xy="73,766" size="816,161"/>
   </displayList>
-  <transition name="t0"/>
 </component>

+ 0 - 72
FGUIProject/assets/EnduringGiftBox/EnduringGiftBoxUIbackups.xml

@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<component size="1080,1118">
-  <displayList>
-    <image id="n0_qqhz" name="n0" src="qqhze" fileName="images/diban.png" xy="23,260" group="n7_qqhz"/>
-    <graph id="n30_qqhz" name="holderPaoMax" xy="4,59" size="401,298" group="n7_qqhz"/>
-    <image id="n1_qqhz" name="n1" src="qqhza" fileName="images/kaikou.png" xy="37,61" group="n7_qqhz"/>
-    <image id="n3_qqhz" name="n3" src="qqhz4" fileName="images/tape.png" xy="-1,576" group="n7_qqhz"/>
-    <image id="n6_qqhz" name="n6" src="qqhzb" fileName="images/heart.png" xy="208,56" group="n7_qqhz" rotation="-0.5"/>
-    <graph id="n31_qqhz" name="holderPaoMin" xy="528,260" size="353,221" group="n7_qqhz"/>
-    <image id="n5_qqhz" name="n5" src="qqhz5" fileName="images/small_paper.png" xy="261,404" group="n7_qqhz"/>
-    <image id="n2_qqhz" name="n2" src="qqhz6" fileName="images/paper.png" xy="30,365" group="n7_qqhz"/>
-    <graph id="n29_qqhz" name="holderBaby" xy="23,-28" size="467,503" group="n7_qqhz"/>
-    <graph id="n33_qqhz" name="holderFg" xy="454,283" size="295,196" group="n7_qqhz"/>
-    <group id="n7_qqhz" name="n7" xy="-1,-28" size="1080,1105"/>
-    <image id="n27_qqhz" name="n27" src="qqhzq" fileName="images/zsx_flower1.png" xy="224,300" group="n17_qqhz"/>
-    <text id="n9_qqhz" name="txtNeed" xy="481,163" size="444,47" group="n17_qqhz" fontSize="32" color="#915e15" align="center" autoSize="none" text="是否花费20粉钻购买60体力?"/>
-    <text id="n34_qqhz" name="txtNum" xy="481,208" pivot="0.5,0" size="444,115" group="n17_qqhz" fontSize="32" color="#915e15" align="center" autoSize="none" text="体力每5分钟恢复1点&#xA;(今日剩余购买次数:8/8)"/>
-    <component id="n12_qqhz" name="btnCancel" src="qqhzs" fileName="components/BtnCancel.xml" xy="362,326" group="n17_qqhz"/>
-    <component id="n14_qqhz" name="btnSure" src="qqhzu" fileName="components/BtnSub.xml" xy="648,326" group="n17_qqhz"/>
-    <group id="n17_qqhz" name="n17" xy="224,163" size="799,238" group="n26_qqhz"/>
-    <text id="n15_qqhz" name="txtPromptExt" xy="151,433" size="753,48" group="n26_qqhz" fontSize="28" color="#a67975" autoSize="none" text="除了上述购买体力的途径,我们还提供了更多的优惠礼包选择"/>
-    <component id="n24_qqhz" name="curSupply" src="qqhz11" fileName="components/ComCurSupply.xml" xy="69,475" group="n26_qqhz"/>
-    <component id="n25_qqhz" name="weekSupply" src="qqhz11" fileName="components/ComCurSupply.xml" xy="69,709" group="n26_qqhz"/>
-    <group id="n26_qqhz" name="n26" xy="69,163" size="954,777"/>
-    <image id="n28_qqhz" name="btnBack" src="qqhz2" fileName="images/back.png" xy="497,1064"/>
-  </displayList>
-  <transition name="t1">
-    <item time="0" type="Alpha" target="n0_qqhz" tween="true" startValue="0" endValue="1" duration="15"/>
-    <item time="0" type="Alpha" target="n12_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n14_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n15_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n1_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n24_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n25_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n27_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n28_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n29_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n2_qqhz" tween="true" startValue="0" endValue="1" duration="15"/>
-    <item time="0" type="Alpha" target="n33_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n3_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n5_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n6_qqhz" value="0"/>
-    <item time="0" type="Alpha" target="n9_qqhz" value="0"/>
-    <item time="0" type="Rotation" target="n0_qqhz" tween="true" startValue="-2" endValue="0" duration="15"/>
-    <item time="0" type="XY" target="n1_qqhz" tween="true" startValue="6,96" endValue="37,61" duration="12"/>
-    <item time="0" type="XY" target="n2_qqhz" tween="true" startValue="-25,400" endValue="30,365" duration="15"/>
-    <item time="9" type="Alpha" target="n33_qqhz" tween="true" startValue="0.7" endValue="1" duration="5"/>
-    <item time="12" type="Alpha" target="n1_qqhz" tween="true" startValue="0.2" endValue="1" duration="11"/>
-    <item time="12" type="Alpha" target="n29_qqhz" tween="true" startValue="0.4" endValue="1" duration="13"/>
-    <item time="12" type="Alpha" target="n6_qqhz" tween="true" startValue="0.6" endValue="1" duration="9"/>
-    <item time="12" type="XY" target="n29_qqhz" tween="true" startValue="36,-5" endValue="23,-28" duration="12"/>
-    <item time="13" type="Alpha" target="n5_qqhz" tween="true" startValue="0.5" endValue="1" duration="8"/>
-    <item time="14" type="Alpha" target="n33_qqhz" tween="true" startValue="1" endValue="0.2" duration="11"/>
-    <item time="14" type="Alpha" target="n9_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="15" type="Alpha" target="n12_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="15" type="Alpha" target="n14_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="15" type="Alpha" target="n28_qqhz" value="0.75"/>
-    <item time="17" type="Alpha" target="n24_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="18" type="Alpha" target="n15_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="18" type="Alpha" target="n27_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="19" type="Alpha" target="n3_qqhz" tween="true" startValue="0.7" endValue="1" duration="6"/>
-    <item time="20" type="Alpha" target="n25_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="21" type="Alpha" target="n28_qqhz" value="1"/>
-    <item time="25" type="Alpha" target="n30_qqhz" tween="true" startValue="0.5" endValue="1" duration="18"/>
-    <item time="25" type="Alpha" target="n31_qqhz" tween="true" startValue="0" endValue="1" duration="18"/>
-    <item time="25" type="Visible" target="n33_qqhz" value="false"/>
-    <item time="43" type="Alpha" target="n30_qqhz" tween="true" startValue="1" endValue="0" duration="24"/>
-    <item time="43" type="Alpha" target="n31_qqhz" tween="true" startValue="1" endValue="0" duration="24"/>
-    <item time="68" type="Visible" target="n30_qqhz" value="false"/>
-    <item time="68" type="Visible" target="n31_qqhz" value="false"/>
-  </transition>
-</component>

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

@@ -45,7 +45,6 @@
     <image id="qqhz1p" name="lm_tb_tishi.png" path="/images/" exported="true"/>
     <component id="qqhz1q" name="ComLeftGiftBox.xml" path="/components/" exported="true"/>
     <component id="qqhz1r" name="ComGouMaiGetText.xml" path="/components/" exported="true"/>
-    <component id="qqhz1v" name="EnduringGiftBoxUIbackups.xml" path="/"/>
     <image id="qqhz25" name="tili.png" path="/images/"/>
     <component id="qqhz26" name="BnBack.xml" path="/components/" exported="true"/>
   </resources>

+ 0 - 71
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_ComItemNumBag.cs

@@ -1,71 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.Bag
-{
-    public partial class UI_ComItemNumBag
-    {
-        public GComponent target;
-        public GTextField m_txtNum;
-        public const string URL = "ui://2bsz6nelv5notmd";
-        public const string PACKAGE_NAME = "Bag";
-        public const string RES_NAME = "ComItemNumBag";
-        private static UI_ComItemNumBag _proxy;
-
-        public static UI_ComItemNumBag Create(GObject gObject = null)
-        {
-            var ui = new UI_ComItemNumBag();
-            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_ComItemNumBag Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComItemNumBag();
-            }
-            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_txtNum = (GTextField)comp.GetChild("txtNum");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_txtNum = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_ComItemNumBag.cs.meta

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

+ 3 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Bag/UI_ListSelectorItem.cs

@@ -9,7 +9,7 @@ namespace UI.Bag
         public GComponent target;
         public GTextField m_txtSelNum;
         public GLoader m_loaIcon;
-        public UI_ComItemNumBag m_comItemNumBag;
+        public GTextField m_txtNum;
         public GButton m_btnReduce;
         public GButton m_btnAdd;
         public const string URL = "ui://2bsz6nelv5notmb";
@@ -61,7 +61,7 @@ namespace UI.Bag
         {
             m_txtSelNum = (GTextField)comp.GetChild("txtSelNum");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
-            m_comItemNumBag = (UI_ComItemNumBag)UI_ComItemNumBag.Create(comp.GetChild("comItemNumBag"));
+            m_txtNum = (GTextField)comp.GetChild("txtNum");
             m_btnReduce = (GButton)comp.GetChild("btnReduce");
             m_btnAdd = (GButton)comp.GetChild("btnAdd");
         }
@@ -69,8 +69,7 @@ namespace UI.Bag
         {
             m_txtSelNum = null;
             m_loaIcon = null;
-            m_comItemNumBag.Dispose();
-            m_comItemNumBag = null;
+            m_txtNum = null;
             m_btnReduce = null;
             m_btnAdd = null;
             if(disposeTarget && target != null)

+ 21 - 5
GameClient/Assets/Game/HotUpdate/Views/Bag/GiftBoxSelectorView.cs

@@ -15,22 +15,29 @@ namespace GFGGame
         private int _count; //物品数量
         private int _selCount; //选择的数量
         private Dictionary<int, int> _selDic; //选择礼包内的物品<物品id,数量>
+        private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
 
         public override void Dispose()
         {
-            base.Dispose();
-
             if (_selDic != null)
             {
                 _selDic.Clear();
                 _selDic = null;
             }
+            
+            for (int i = 0; i < _listLongPress.Count; i++)
+            {
+                _listLongPress[i].Dispose();
+            }
+            _listLongPress.Clear();
 
             if (_ui != null)
             {
                 _ui.Dispose();
                 _ui = null;
             }
+            
+            base.Dispose();
         }
 
         protected override void OnInit()
@@ -113,17 +120,26 @@ namespace GFGGame
             ItemCfg itemCfgChild = ItemCfgArray.Instance.GetCfg(itemChildArr[0]);
             uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
             uiItemChild.m_loaIcon.onClick.Add(OnListSelectorItemClick);
-            uiItemChild.m_comItemNumBag.m_txtNum.text = itemChildArr[1].ToString();
+            uiItemChild.m_txtNum.text = itemChildArr[1].ToString();
             uiItemChild.m_txtSelNum.text = "0";
-            uiItemChild.m_btnAdd.onClick.Add(OnChildBtnAddClick);
+            //uiItemChild.m_btnAdd.onClick.Add(OnChildBtnAddClick);
             uiItemChild.m_btnReduce.onClick.Add(OnChildBtnReduceClick);
+            
+            if (uiItemChild.target.data == null)
+            {
+                LongPressGesture longPressGesture = new LongPressGesture(uiItemChild.m_btnAdd);
+                longPressGesture.once = true;
+                longPressGesture.onAction.Add(OnLongPress);
+                _listLongPress.Add(longPressGesture);
+            }
 
             uiItemChild.target.data = itemCfgChild;
             UI_ListSelectorItem.ProxyEnd();
         }
 
-        private void OnChildBtnAddClick(EventContext context)
+        private void OnLongPress(EventContext context)
         {
+            LongPressGesture gesture = (LongPressGesture)context.sender;
             GObject sender = context.sender as GObject;
             GObject obj = sender.parent;
             UI_ListSelectorItem listItem = UI_ListSelectorItem.Proxy(obj);

BIN
GameClient/Assets/ResIn/UI/Bag/Bag_fui.bytes