示例#1
0
 internal static void MaximizeKeyHandler()
 {
     if ((WindowLayout.s_MaximizeKey.activated || Event.current.type == EditorGUIUtility.magnifyGestureEventType) && GUIUtility.hotControl == 0)
     {
         EventType type = Event.current.type;
         Event.current.Use();
         EditorWindow mouseOverWindow = EditorWindow.mouseOverWindow;
         if (mouseOverWindow && !(mouseOverWindow is PreviewWindow))
         {
             if (type == EditorGUIUtility.magnifyGestureEventType)
             {
                 if ((double)Event.current.delta.x < -0.05)
                 {
                     if (WindowLayout.IsMaximized(mouseOverWindow))
                     {
                         WindowLayout.Unmaximize(mouseOverWindow);
                     }
                 }
                 else if ((double)Event.current.delta.x > 0.05 && !WindowLayout.IsMaximized(mouseOverWindow))
                 {
                     WindowLayout.Maximize(mouseOverWindow);
                 }
             }
             else if (WindowLayout.IsMaximized(mouseOverWindow))
             {
                 WindowLayout.Unmaximize(mouseOverWindow);
             }
             else
             {
                 WindowLayout.Maximize(mouseOverWindow);
             }
         }
     }
 }
示例#2
0
        private void Maximize(object userData)
        {
            EditorWindow editorWindow = userData as EditorWindow;

            if (editorWindow != null)
            {
                WindowLayout.Maximize(editorWindow);
            }
        }
示例#3
0
        void Maximize(object userData)
        {
            EditorWindow window = userData as EditorWindow;

            if (window != null)
            {
                WindowLayout.Maximize(window);
            }
        }
示例#4
0
        internal static void MaximizeKeyHandler()
        {
            if (!WindowLayout.s_MaximizeKey.activated && Event.current.type != EditorGUIUtility.magnifyGestureEventType || GUIUtility.hotControl != 0)
            {
                return;
            }
            EventType type = Event.current.type;

            Event.current.Use();
            EditorWindow mouseOverWindow = EditorWindow.mouseOverWindow;

            if (!(bool)((UnityEngine.Object)mouseOverWindow) || mouseOverWindow is PreviewWindow)
            {
                return;
            }
            if (type == EditorGUIUtility.magnifyGestureEventType)
            {
                if ((double)Event.current.delta.x < -0.05)
                {
                    if (!WindowLayout.IsMaximized(mouseOverWindow))
                    {
                        return;
                    }
                    WindowLayout.Unmaximize(mouseOverWindow);
                }
                else
                {
                    if ((double)Event.current.delta.x <= 0.05 || WindowLayout.IsMaximized(mouseOverWindow))
                    {
                        return;
                    }
                    WindowLayout.Maximize(mouseOverWindow);
                }
            }
            else if (WindowLayout.IsMaximized(mouseOverWindow))
            {
                WindowLayout.Unmaximize(mouseOverWindow);
            }
            else
            {
                WindowLayout.Maximize(mouseOverWindow);
            }
        }
示例#5
0
        private void Maximize(object userData)
        {
            EditorWindow win = (EditorWindow)userData;

            WindowLayout.Maximize(win);
        }
示例#6
0
 private void Maximize(object userData)
 {
     WindowLayout.Maximize((EditorWindow)userData);
 }