فهرست منبع

跳转界面打开过得界面重新置顶显示

huangxiaoyue 1 سال پیش
والد
کامیت
aad1f4cfdb

+ 13 - 1
GameClient/Assets/Game/HotUpdate/Views/BaseWindow.cs

@@ -104,6 +104,18 @@ namespace GFGGame
             }
         }
 
+
+        /// <summary>
+        /// 刷新界面
+        /// </summary>
+        protected override void BringToFront()
+        {
+            if (_window != null)
+            {
+                this._window.BringToFront();
+            }
+        }
+
         protected override void OnInit()
         {
             base.OnInit();
@@ -119,7 +131,7 @@ namespace GFGGame
             base.OnShown();
             CheckCreateCloseButton();
         }
-
+        
         protected override void OnHide()
         {
             base.OnHide();

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Views/UIView.cs

@@ -126,6 +126,7 @@ namespace GFGGame
             object temp = viewData;
             this.OnHide();
             this.viewData = temp;
+            this.BringToFront();
             this.OnShown();
         }
 
@@ -133,6 +134,10 @@ namespace GFGGame
         {
         }
 
+        virtual protected void BringToFront()
+        {
+        }
+
         public virtual void Hide()
         {
             // UIPackageManager.Instance.RemovePackageView(_descFilePath, viewName);

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

@@ -228,6 +228,7 @@ namespace GFGGame
                 }
                 if (!hasShowingView || (viewStructure.iUIView.isReturnView && viewStructure.name == viewName))
                 {
+                    //关闭自己,在队列里去除
                     if(viewStructure.iUIView.isReturnView && viewStructure.name == viewName)
                         _viewStack.RemoveAt(_viewStack.Count - 1);
 

+ 1 - 0
GameClient/Assets/ThirdParty/FairyGUI/Scripts/UI/Window.cs

@@ -277,6 +277,7 @@ namespace FairyGUI
         public void BringToFront()
         {
             this.root.BringToFront(this);
+            this.root.AdjustModalLayer();
         }
 
         /// <summary>