public void HandleEdgesEnd(Rect windowPosition) { if (ContainerWindow.macEditor && Event.current.type == EventType.Repaint && this.MacWindowCanResize(windowPosition)) { if (ContainerWindow.s_WindowResize == null) { ContainerWindow.InitIcons(); } ContainerWindow.s_WindowResize.Draw(new Rect(windowPosition.width - ContainerWindow.s_WindowResize.fixedWidth, windowPosition.height - ContainerWindow.s_WindowResize.fixedHeight, ContainerWindow.s_WindowResize.fixedWidth, ContainerWindow.s_WindowResize.fixedHeight), false, false, false, false); } }
public void HandleEdgesStart(Rect windowPosition) { bool left = windowPosition.x == 0f; bool flag = windowPosition.y == 0f; bool flag2 = Mathf.Abs(windowPosition.xMax - this.position.width) < 2f; bool bottom = Mathf.Abs(windowPosition.yMax - this.position.height) < 2f; ContainerWindow.InitIcons(); if (ContainerWindow.macEditor) { if (flag2 && flag && this.showMode != ShowMode.Utility && this.showMode != ShowMode.PopupMenu) { GUIView focusedView = GUIView.focusedView; GUIStyle style; GUIStyle style2; GUIStyle style3; if (focusedView && focusedView.window == this) { style = ContainerWindow.s_ButtonClose; style2 = ContainerWindow.s_ButtonMin; style3 = ContainerWindow.s_ButtonMax; } else { style2 = (style = (style3 = ContainerWindow.s_ButtonInactive)); } if (GUI.Button(new Rect(windowPosition.width - 13f - 4f, 0f, 13f, 13f), GUIContent.none, style)) { this.Close(); } if (GUI.Button(new Rect(windowPosition.width - 26f - 3f - 4f, 0f, 13f, 13f), GUIContent.none, style2)) { this.Minimize(); GUIUtility.ExitGUI(); } if (GUI.Button(new Rect(windowPosition.width - 39f - 6f - 4f, 0f, 13f, 13f), GUIContent.none, style3)) { this.ToggleMaximize(); } } if (this.MacWindowCanResize(windowPosition)) { this.DragWindowEdgesMac(left, flag, flag2, bottom, windowPosition); } } else { if (flag2 && flag && this.showMode != ShowMode.Utility && this.showMode != ShowMode.PopupMenu) { if (GUI.Button(new Rect(windowPosition.width - 13f - 4f, 0f, 13f, 13f), GUIContent.none, ContainerWindow.s_ButtonClose)) { this.Close(); } if (GUI.Button(new Rect(windowPosition.width - 26f - 3f - 4f, 0f, 13f, 13f), GUIContent.none, ContainerWindow.s_ButtonMax)) { this.ToggleMaximize(); } } if (!this.maximized) { this.DragWindowEdgesWin(left, flag, flag2, bottom, windowPosition); } } }