void DrawTopToolbar(Vector2 mousePos, bool mouseUp, out bool searchChanged) { EditorGUILayout.BeginHorizontal(); if (backButton != null) { backButton.DrawBackButton(mousePos, mouseUp, dragDropHandler); } //cur path GUI.enabled = false; GUI.backgroundColor = Color.white; string curPath = GetCurrentDisplayPathText(); EditorGUILayout.TextField(curPath); GUI.enabled = true; //draw showDirectoryTree = GUIUtils.ToggleButton(new GUIContent("Show Directory Tree"), GUIStyles.toolbarButton, showDirectoryTree, out _); //search string lastSearch = searchFilter; string defSearch = searchFilter.IsEmpty() ? "Search" : searchFilter; string searchResult = GUIUtils.DrawTextField(defSearch, GUIUtils.TextFieldType.Delayed, true, "Search", out _, searchBarWidth); if (searchResult != defSearch) { searchFilter = searchResult; } searchChanged = searchFilter != lastSearch; toolbarButtons(); EditorGUILayout.EndHorizontal(); }