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); } } } }
private void Maximize(object userData) { EditorWindow editorWindow = userData as EditorWindow; if (editorWindow != null) { WindowLayout.Maximize(editorWindow); } }
void Maximize(object userData) { EditorWindow window = userData as EditorWindow; if (window != null) { WindowLayout.Maximize(window); } }
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); } }
private void Maximize(object userData) { EditorWindow win = (EditorWindow)userData; WindowLayout.Maximize(win); }
private void Maximize(object userData) { WindowLayout.Maximize((EditorWindow)userData); }