zhaoyang 2 jaren geleden
bovenliggende
commit
690980a61d

+ 9 - 5
FGUIProject/assets/LuckyBox/components/Button3.xml

@@ -1,11 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="90,90" extention="Button">
+<component size="94,95" extention="Button">
   <controller name="button" pages="0,up,1,down" selected="0"/>
+  <controller name="c1" exported="true" pages="0,,1,,2,,3," selected="3"/>
   <displayList>
-    <image id="n6_idkd" name="n6" src="volstbh" fileName="imageNews/zx_yulan_tubiao_bg.png" xy="0,0"/>
-    <image id="n5_idkd" name="n5" src="volstbg" fileName="imageNews/zx_yulan_tubiao.png" xy="22,15"/>
-    <image id="n7_idkd" name="n7" src="volstbi" fileName="imageNews/zx_yulan_xinggui.png" xy="-15,-6"/>
-    <image id="n4_idkd" name="n4" src="volstbf" fileName="imageNews/zx_yulan_diaoshi.png" xy="-9,-92"/>
+    <loader id="n1_vek8" name="icon" xy="0,0" size="94,95" url="ui://drx9d1usvek8v" autoSize="true"/>
+    <movieclip id="n2_jpnf" name="n2" src="jpnf1x" fileName="effect/MovieClip1.jta" xy="-53,-11">
+      <gearDisplay controller="c1" pages="1,3"/>
+    </movieclip>
+    <movieclip id="n3_jpnf" name="n3" src="jpnf26" fileName="effect/MovieClip2.jta" xy="-53,-10">
+      <gearDisplay controller="c1" pages="2"/>
+    </movieclip>
   </displayList>
   <Button/>
 </component>

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_Button3.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.LuckyBox
+{
+    public partial class UI_Button3
+    {
+        public GButton target;
+        public Controller m_c1;
+        public const string URL = "ui://drx9d1usga16d";
+        public const string PACKAGE_NAME = "LuckyBox";
+        public const string RES_NAME = "Button3";
+        private static UI_Button3 _proxy;
+
+        public static UI_Button3 Create(GObject gObject = null)
+        {
+            var ui = new UI_Button3();
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_Button3 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_Button3();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GButton)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");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_c1 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_Button3.cs.meta

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

+ 3 - 2
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox.cs

@@ -8,7 +8,7 @@ namespace UI.LuckyBox
     {
         public GComponent target;
         public UI_ComModel m_comModel;
-        public GButton m_btnPreview;
+        public UI_Button3 m_btnPreview;
         public GTextField m_txtOwned;
         public GImage m_imgActLuckyBox;
         public GTextField m_txtTime;
@@ -67,7 +67,7 @@ namespace UI.LuckyBox
         private void Init(GComponent comp)
         {
             m_comModel = (UI_ComModel)UI_ComModel.Create(comp.GetChild("comModel"));
-            m_btnPreview = (GButton)comp.GetChild("btnPreview");
+            m_btnPreview = (UI_Button3)UI_Button3.Create(comp.GetChild("btnPreview"));
             m_txtOwned = (GTextField)comp.GetChild("txtOwned");
             m_imgActLuckyBox = (GImage)comp.GetChild("imgActLuckyBox");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
@@ -83,6 +83,7 @@ namespace UI.LuckyBox
         {
             m_comModel.Dispose();
             m_comModel = null;
+            m_btnPreview.Dispose();
             m_btnPreview = null;
             m_txtOwned = null;
             m_imgActLuckyBox = null;

+ 6 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox_2.cs

@@ -8,8 +8,8 @@ namespace UI.LuckyBox
     {
         public GComponent target;
         public UI_ComModel m_comModel;
-        public GButton m_btnPreview;
-        public GButton m_btnExchange;
+        public UI_Button3 m_btnPreview;
+        public UI_Button3 m_btnExchange;
         public GTextField m_txtOwned;
         public UI_ComCost m_comCostOne;
         public UI_ComCost m_comCostTen;
@@ -65,8 +65,8 @@ namespace UI.LuckyBox
         private void Init(GComponent comp)
         {
             m_comModel = (UI_ComModel)UI_ComModel.Create(comp.GetChild("comModel"));
-            m_btnPreview = (GButton)comp.GetChild("btnPreview");
-            m_btnExchange = (GButton)comp.GetChild("btnExchange");
+            m_btnPreview = (UI_Button3)UI_Button3.Create(comp.GetChild("btnPreview"));
+            m_btnExchange = (UI_Button3)UI_Button3.Create(comp.GetChild("btnExchange"));
             m_txtOwned = (GTextField)comp.GetChild("txtOwned");
             m_comCostOne = (UI_ComCost)UI_ComCost.Create(comp.GetChild("comCostOne"));
             m_comCostTen = (UI_ComCost)UI_ComCost.Create(comp.GetChild("comCostTen"));
@@ -79,7 +79,9 @@ namespace UI.LuckyBox
         {
             m_comModel.Dispose();
             m_comModel = null;
+            m_btnPreview.Dispose();
             m_btnPreview = null;
+            m_btnExchange.Dispose();
             m_btnExchange = null;
             m_txtOwned = null;
             m_comCostOne.Dispose();

+ 6 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox_3.cs

@@ -9,8 +9,8 @@ namespace UI.LuckyBox
         public GComponent target;
         public UI_ComModel m_comModel;
         public GLoader m_loaImg;
-        public GButton m_btnPreview;
-        public GButton m_btnExchange;
+        public UI_Button3 m_btnPreview;
+        public UI_Button3 m_btnExchange;
         public GTextField m_txtOwned;
         public UI_ComCost m_comCostOne;
         public UI_ComCost m_comCostTen;
@@ -66,8 +66,8 @@ namespace UI.LuckyBox
         {
             m_comModel = (UI_ComModel)UI_ComModel.Create(comp.GetChild("comModel"));
             m_loaImg = (GLoader)comp.GetChild("loaImg");
-            m_btnPreview = (GButton)comp.GetChild("btnPreview");
-            m_btnExchange = (GButton)comp.GetChild("btnExchange");
+            m_btnPreview = (UI_Button3)UI_Button3.Create(comp.GetChild("btnPreview"));
+            m_btnExchange = (UI_Button3)UI_Button3.Create(comp.GetChild("btnExchange"));
             m_txtOwned = (GTextField)comp.GetChild("txtOwned");
             m_comCostOne = (UI_ComCost)UI_ComCost.Create(comp.GetChild("comCostOne"));
             m_comCostTen = (UI_ComCost)UI_ComCost.Create(comp.GetChild("comCostTen"));
@@ -80,7 +80,9 @@ namespace UI.LuckyBox
             m_comModel.Dispose();
             m_comModel = null;
             m_loaImg = null;
+            m_btnPreview.Dispose();
             m_btnPreview = null;
+            m_btnExchange.Dispose();
             m_btnExchange = null;
             m_txtOwned = null;
             m_comCostOne.Dispose();

+ 6 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox_4.cs

@@ -8,8 +8,8 @@ namespace UI.LuckyBox
     {
         public GComponent target;
         public UI_ComModel m_comModel;
-        public GButton m_btnPreview;
-        public GButton m_btnExchange;
+        public UI_Button3 m_btnPreview;
+        public UI_Button3 m_btnExchange;
         public GTextField m_txtOwned;
         public GTextField m_txtTime;
         public UI_ComCost m_comCostOne;
@@ -65,8 +65,8 @@ namespace UI.LuckyBox
         private void Init(GComponent comp)
         {
             m_comModel = (UI_ComModel)UI_ComModel.Create(comp.GetChild("comModel"));
-            m_btnPreview = (GButton)comp.GetChild("btnPreview");
-            m_btnExchange = (GButton)comp.GetChild("btnExchange");
+            m_btnPreview = (UI_Button3)UI_Button3.Create(comp.GetChild("btnPreview"));
+            m_btnExchange = (UI_Button3)UI_Button3.Create(comp.GetChild("btnExchange"));
             m_txtOwned = (GTextField)comp.GetChild("txtOwned");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_comCostOne = (UI_ComCost)UI_ComCost.Create(comp.GetChild("comCostOne"));
@@ -79,7 +79,9 @@ namespace UI.LuckyBox
         {
             m_comModel.Dispose();
             m_comModel = null;
+            m_btnPreview.Dispose();
             m_btnPreview = null;
+            m_btnExchange.Dispose();
             m_btnExchange = null;
             m_txtOwned = null;
             m_txtTime = null;

+ 4 - 3
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -106,6 +106,7 @@ namespace GFGGame
 
             LuckyBoxDataManager.Instance.InitData(_luckyBoxCfg.id);
             comBox.m_comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[0]);
+            comBox.m_btnPreview.m_c1.selectedIndex = 1;
             LuckyBoxDataManager.Instance.GetOwnedCount(_luckyBoxCfg.id, out int count, out int totalCount);
             comBox.m_txtOwned.SetVar("v1", "" + count).FlushVars();
             comBox.m_txtOwned.SetVar("v2", "" + totalCount).FlushVars();
@@ -130,11 +131,11 @@ namespace GFGGame
             comBox.m_btnBuyTen.target.data = _luckyBoxCfg.id;
             comBox.m_imgActLuckyBox.visible = true;
             comBox.m_grpLuckyBox.visible = false;
-            if (comBox.m_btnPreview.data == null)
+            if (comBox.m_btnPreview.target.data == null)
             {
-                comBox.m_btnPreview.onClick.Add(OnClickBtnPreview);
+                comBox.m_btnPreview.target.onClick.Add(OnClickBtnPreview);
             }
-            comBox.m_btnPreview.data = _luckyBoxCfg.id;
+            comBox.m_btnPreview.target.data = _luckyBoxCfg.id;
 
             comBox.target.data = _luckyBoxCfg.id;
 

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png


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