public static bool ShouldShowWindow() { if (!FolderManager.Exists()) { FolderManagerGUI.Title("First Time Setup"); GUILayout.Space(20); if (GUILayout.Button("Start Making My Life Easier!")) { if (FolderManager.Create()) { return(true); } } return(false); } return(true); }
private void OnGUI() { GetEditor(); Cache.AssureFolderTree(); Initialize(); if (WindowUtility.ShouldShowWindow()) { FolderManagerGUI.Title("FolderManager"); EditorGUILayout.Space(); PopupManager.StartPopupGUI(); ShowBody(); FMInputManager.HandleInputEvents(_treeViewState); FMInputManager.HandleLateInputEvents(_treeViewState); PopupManager.EndPopupGUI(); } }
private void ShowBody() { float maxWidth = position.width * 0.5f; EditorGUILayout.BeginHorizontal(); EditorGUILayout.BeginVertical(); Rect positionCheck = EditorGUILayout.GetControlRect(GUILayout.MaxWidth(maxWidth)); FolderManagerGUI.Title(positionCheck, "Manage folder tree"); _createScrollPosition = GUILayout.BeginScrollView(_createScrollPosition, "HelpBox", GUILayout.MaxHeight(350), GUILayout.MaxWidth(maxWidth)); if (Cache.FolderTree != null) { SearchBar(ToolbarRect()); } DrawCurrentTree(FolderTreeViewRect()); GUILayout.EndScrollView(); EditorGUILayout.EndVertical(); EditorGUILayout.Space(); EditorGUILayout.BeginVertical(); positionCheck = EditorGUILayout.GetControlRect(GUILayout.MaxWidth(maxWidth)); FolderManagerGUI.Title(positionCheck, "Settings"); _createScrollPosition = GUILayout.BeginScrollView(_createScrollPosition, "HelpBox", GUILayout.MaxHeight(350), GUILayout.MaxWidth(maxWidth)); DrawSettings(); EditorGUILayout.EndScrollView(); EditorGUILayout.EndVertical(); EditorGUILayout.EndHorizontal(); }