guodong преди 3 години
родител
ревизия
7599feda44

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstSortingOrder.cs

@@ -3,5 +3,6 @@ namespace GFGGame
     public class ConstSortingOrder
     public class ConstSortingOrder
     {
     {
         public const int TOP = 99;
         public const int TOP = 99;
+        public const int Debug = 100;
     }
     }
 }
 }

+ 7 - 3
GameClient/Assets/Game/HotUpdate/Controller/LogController.cs

@@ -69,12 +69,12 @@ namespace GFGGame
                         _btnLog.m_c1.selectedIndex = 1;
                         _btnLog.m_c1.selectedIndex = 1;
                         _btnLog.target.alpha = 1;
                         _btnLog.target.alpha = 1;
                     }
                     }
-                    if (LauncherConfig.onDebug == 1)
+                    if (LauncherConfig.onDebug >= 1)
                     {
                     {
                         ViewManager.Show(ViewName.LOG_VIEW);
                         ViewManager.Show(ViewName.LOG_VIEW);
                     }
                     }
                     break;
                     break;
-                case LogType.Log:
+                default:
                     if (msgDic[_all].Count == _maxCount)
                     if (msgDic[_all].Count == _maxCount)
                     {
                     {
                         msgDic[_all].RemoveAt(0);
                         msgDic[_all].RemoveAt(0);
@@ -86,6 +86,10 @@ namespace GFGGame
                     msg = string.Format("log@{2}\n{0}\n{1}", condition, stackTrace, time);
                     msg = string.Format("log@{2}\n{0}\n{1}", condition, stackTrace, time);
                     msgDic[_all].Add(msg);
                     msgDic[_all].Add(msg);
                     msgDic[_log].Add(msg);
                     msgDic[_log].Add(msg);
+                    if (LauncherConfig.onDebug >= 2)
+                    {
+                        ViewManager.Show(ViewName.LOG_VIEW);
+                    }
                     break;
                     break;
             }
             }
 
 
@@ -97,7 +101,7 @@ namespace GFGGame
             if (_btnLog == null)
             if (_btnLog == null)
             {
             {
                 _btnLog = UI_BtnLog.Create();
                 _btnLog = UI_BtnLog.Create();
-                ViewManager.AddChildToTopLayer(_btnLog.target);
+                ViewManager.AddChildToDebugLayer(_btnLog.target);
                 this.SetBtnLogVisable(false);
                 this.SetBtnLogVisable(false);
                 _btnLog.target.x = 50;
                 _btnLog.target.x = 50;
                 _btnLog.target.y = 1880;
                 _btnLog.target.y = 1880;

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Views/Log/LogView.cs

@@ -2,6 +2,8 @@
 using UI.Common;
 using UI.Common;
 using FairyGUI;
 using FairyGUI;
 using System.Collections.Generic;
 using System.Collections.Generic;
+using UnityEngine;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
 
 
 namespace GFGGame
 namespace GFGGame
 {
 {
@@ -23,6 +25,7 @@ namespace GFGGame
             this.modal = true;
             this.modal = true;
 
 
             _ui.m_listLog.itemRenderer = RenderListLogItem;
             _ui.m_listLog.itemRenderer = RenderListLogItem;
+            _ui.m_listLog.onClickItem.Add(OnClickItem);
             _ui.m_c1.onChanged.Add(this.OnChangeC1);
             _ui.m_c1.onChanged.Add(this.OnChangeC1);
 
 
             _ui.m_btnClear.onClick.Add(this.OnClickBtnClear);
             _ui.m_btnClear.onClick.Add(this.OnClickBtnClear);
@@ -87,6 +90,13 @@ namespace GFGGame
             }
             }
             this.OnChangeC1();
             this.OnChangeC1();
         }
         }
+
+        private void OnClickItem(EventContext context)
+        {
+            UI_ListLogItem item = UI_ListLogItem.Proxy(context.data as GObject);
+            GUIUtility.systemCopyBuffer = item.m_txtLog.text;
+        }
+
         protected override void OnHide()
         protected override void OnHide()
         {
         {
             base.OnHide();
             base.OnHide();

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

@@ -14,6 +14,7 @@ namespace GFGGame
         private static Dictionary<string, UIView> _viewDic;
         private static Dictionary<string, UIView> _viewDic;
         private static GComponent _bottomLayer;
         private static GComponent _bottomLayer;
         private static GComponent _topLayer;
         private static GComponent _topLayer;
+        private static GComponent _debugLayer;
         private static Dictionary<string, object[]> _goBackDatas = new Dictionary<string, object[]>();
         private static Dictionary<string, object[]> _goBackDatas = new Dictionary<string, object[]>();
 
 
         public static void Init()
         public static void Init()
@@ -31,7 +32,9 @@ namespace GFGGame
             //��ʼ����ͼ������
             //��ʼ����ͼ������
             _bottomLayer = CreateLayer("BottomLayer");
             _bottomLayer = CreateLayer("BottomLayer");
             _topLayer = CreateLayer("TopLayer");
             _topLayer = CreateLayer("TopLayer");
-            _topLayer.sortingOrder = ConstSortingOrder.TOP;
+            //debug层
+            _debugLayer = CreateLayer("DebugLayer");
+            _debugLayer.sortingOrder = ConstSortingOrder.Debug;
             SetMaskAlpha(0.6f);
             SetMaskAlpha(0.6f);
         }
         }
 
 
@@ -45,6 +48,11 @@ namespace GFGGame
             _topLayer.AddChild(gObject);
             _topLayer.AddChild(gObject);
         }
         }
 
 
+        public static void AddChildToDebugLayer(GObject gObject)
+        {
+            _debugLayer.AddChild(gObject);
+        }
+
         /// <summary>
         /// <summary>
         /// ��ʾһ����ͼ
         /// ��ʾһ����ͼ
         /// </summary>
         /// </summary>