|
@@ -316,6 +316,7 @@ namespace BansheeEditor
|
|
|
private GUIButton optionsButton;
|
|
private GUIButton optionsButton;
|
|
|
private GUILayout folderBarLayout;
|
|
private GUILayout folderBarLayout;
|
|
|
private GUILayout folderListLayout;
|
|
private GUILayout folderListLayout;
|
|
|
|
|
+ private GUITextField searchField;
|
|
|
|
|
|
|
|
private ContextMenu entryContextMenu;
|
|
private ContextMenu entryContextMenu;
|
|
|
private ProjectDropTarget dropTarget;
|
|
private ProjectDropTarget dropTarget;
|
|
@@ -349,7 +350,7 @@ namespace BansheeEditor
|
|
|
GUILayoutY contentLayout = GUI.AddLayoutY();
|
|
GUILayoutY contentLayout = GUI.AddLayoutY();
|
|
|
|
|
|
|
|
searchBarLayout = contentLayout.AddLayoutX();
|
|
searchBarLayout = contentLayout.AddLayoutX();
|
|
|
- GUITextField searchField = new GUITextField();
|
|
|
|
|
|
|
+ searchField = new GUITextField();
|
|
|
searchField.OnChanged += OnSearchChanged;
|
|
searchField.OnChanged += OnSearchChanged;
|
|
|
GUIButton clearSearchBtn = new GUIButton("C");
|
|
GUIButton clearSearchBtn = new GUIButton("C");
|
|
|
clearSearchBtn.OnClick += ClearSearch;
|
|
clearSearchBtn.OnClick += ClearSearch;
|
|
@@ -369,6 +370,7 @@ namespace BansheeEditor
|
|
|
|
|
|
|
|
folderBarLayout.AddElement(homeButton);
|
|
folderBarLayout.AddElement(homeButton);
|
|
|
folderBarLayout.AddElement(upButton);
|
|
folderBarLayout.AddElement(upButton);
|
|
|
|
|
+ folderBarLayout.AddSpace(10);
|
|
|
|
|
|
|
|
contentScrollArea = new GUIScrollArea(GUIOption.FlexibleWidth(), GUIOption.FlexibleHeight());
|
|
contentScrollArea = new GUIScrollArea(GUIOption.FlexibleWidth(), GUIOption.FlexibleHeight());
|
|
|
contentLayout.AddElement(contentScrollArea);
|
|
contentLayout.AddElement(contentScrollArea);
|
|
@@ -922,6 +924,8 @@ namespace BansheeEditor
|
|
|
entryLookup.Clear();
|
|
entryLookup.Clear();
|
|
|
scrollAreaPanel = contentScrollArea.Layout.AddPanel();
|
|
scrollAreaPanel = contentScrollArea.Layout.AddPanel();
|
|
|
|
|
|
|
|
|
|
+ RefreshDirectoryBar();
|
|
|
|
|
+
|
|
|
if (entriesToDisplay.Length == 0)
|
|
if (entriesToDisplay.Length == 0)
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
@@ -1013,8 +1017,6 @@ namespace BansheeEditor
|
|
|
catchAll.OnFocusChanged += OnContentsFocusChanged;
|
|
catchAll.OnFocusChanged += OnContentsFocusChanged;
|
|
|
|
|
|
|
|
contentInfo.underlay.AddElement(catchAll);
|
|
contentInfo.underlay.AddElement(catchAll);
|
|
|
-
|
|
|
|
|
- RefreshDirectoryBar();
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void RefreshDirectoryBar()
|
|
private void RefreshDirectoryBar()
|
|
@@ -1033,21 +1035,23 @@ namespace BansheeEditor
|
|
|
if (IsSearchActive)
|
|
if (IsSearchActive)
|
|
|
{
|
|
{
|
|
|
folders = new[] {searchQuery};
|
|
folders = new[] {searchQuery};
|
|
|
- fullPaths = new[] {""};
|
|
|
|
|
|
|
+ fullPaths = new[] { searchQuery };
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- folders = currentDirectory.Split(new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar },
|
|
|
|
|
|
|
+ string currentDir = Path.Combine("Resources", currentDirectory);
|
|
|
|
|
+
|
|
|
|
|
+ folders = currentDir.Split(new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar },
|
|
|
StringSplitOptions.RemoveEmptyEntries);
|
|
StringSplitOptions.RemoveEmptyEntries);
|
|
|
- fullPaths = new string[folders.Length];
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- for (int i = 0; i < folders.Length; i++)
|
|
|
|
|
- {
|
|
|
|
|
- if (i == 0)
|
|
|
|
|
- fullPaths[i] = folders[i];
|
|
|
|
|
- else
|
|
|
|
|
- fullPaths[i] = Path.Combine(fullPaths[i - 1], folders[i]);
|
|
|
|
|
|
|
+ fullPaths = new string[folders.Length];
|
|
|
|
|
+ for (int i = 0; i < folders.Length; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (i == 0)
|
|
|
|
|
+ fullPaths[i] = "";
|
|
|
|
|
+ else
|
|
|
|
|
+ fullPaths[i] = Path.Combine(fullPaths[i - 1], folders[i]);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int availableWidth = folderBarLayout.Bounds.width - FOLDER_BUTTON_WIDTH * 2;
|
|
int availableWidth = folderBarLayout.Bounds.width - FOLDER_BUTTON_WIDTH * 2;
|
|
@@ -1118,9 +1122,12 @@ namespace BansheeEditor
|
|
|
|
|
|
|
|
private void OnUpClicked()
|
|
private void OnUpClicked()
|
|
|
{
|
|
{
|
|
|
- string parent = Path.GetDirectoryName(currentDirectory);
|
|
|
|
|
- if (!string.IsNullOrEmpty(parent))
|
|
|
|
|
|
|
+ currentDirectory = currentDirectory.Trim(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
|
|
|
|
+
|
|
|
|
|
+ if (!string.IsNullOrEmpty(currentDirectory))
|
|
|
{
|
|
{
|
|
|
|
|
+ string parent = Path.GetDirectoryName(currentDirectory);
|
|
|
|
|
+
|
|
|
currentDirectory = parent;
|
|
currentDirectory = parent;
|
|
|
Refresh();
|
|
Refresh();
|
|
|
}
|
|
}
|
|
@@ -1168,6 +1175,7 @@ namespace BansheeEditor
|
|
|
|
|
|
|
|
private void ClearSearch()
|
|
private void ClearSearch()
|
|
|
{
|
|
{
|
|
|
|
|
+ searchField.Value = "";
|
|
|
searchQuery = "";
|
|
searchQuery = "";
|
|
|
Refresh();
|
|
Refresh();
|
|
|
}
|
|
}
|