Browse Source

替换提示框ui

huangxiaoyue 1 year ago
parent
commit
70e4a103c3

+ 8 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BuyTipsUI.cs

@@ -8,12 +8,12 @@ namespace UI.CommonGame
     {
         public GComponent target;
         public Controller m_checkType;
-        public GComponent m_bg;
+        public GImage m_bg;
         public GTextField m_txtNeed;
         public GTextField m_txtCost;
         public GLoader m_loaNeed;
-        public GButton m_btnCancel;
-        public GButton m_btnSure;
+        public UI_Button18 m_btnCancel;
+        public UI_Button18 m_btnSure;
         public GButton m_btnCheck;
         public const string URL = "ui://eg2y0ldpds629g";
         public const string PACKAGE_NAME = "CommonGame";
@@ -63,12 +63,12 @@ namespace UI.CommonGame
         private void Init(GComponent comp)
         {
             m_checkType = comp.GetController("checkType");
-            m_bg = (GComponent)comp.GetChild("bg");
+            m_bg = (GImage)comp.GetChild("bg");
             m_txtNeed = (GTextField)comp.GetChild("txtNeed");
             m_txtCost = (GTextField)comp.GetChild("txtCost");
             m_loaNeed = (GLoader)comp.GetChild("loaNeed");
-            m_btnCancel = (GButton)comp.GetChild("btnCancel");
-            m_btnSure = (GButton)comp.GetChild("btnSure");
+            m_btnCancel = (UI_Button18)UI_Button18.Create(comp.GetChild("btnCancel"));
+            m_btnSure = (UI_Button18)UI_Button18.Create(comp.GetChild("btnSure"));
             m_btnCheck = (GButton)comp.GetChild("btnCheck");
         }
         public void Dispose(bool disposeTarget = false)
@@ -78,7 +78,9 @@ namespace UI.CommonGame
             m_txtNeed = null;
             m_txtCost = null;
             m_loaNeed = null;
+            m_btnCancel.Dispose();
             m_btnCancel = null;
+            m_btnSure.Dispose();
             m_btnSure = null;
             m_btnCheck = null;
             if(disposeTarget && target != null)

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyTipsView.cs

@@ -36,9 +36,9 @@ namespace GFGGame
             this.modal = true;
             viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
 
-            _ui.m_btnSure.onClick.Add(OnClickBtnSure);
-            _ui.m_btnCancel.onClick.Add(OnClickBtnCancel);
-            _ui.m_btnCancel.onClick.Add(OnClickBtnCancel);
+            _ui.m_btnSure.target.onClick.Add(OnClickBtnSure);
+            _ui.m_btnCancel.target.onClick.Add(OnClickBtnCancel);
+            _ui.m_btnCancel.target.onClick.Add(OnClickBtnCancel);
             _ui.m_btnCheck.onClick.Add(OnBtnCheckClick);
         }
 

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes