Marko Pintera 10 лет назад
Родитель
Сommit
fd8544f423
2 измененных файлов с 12 добавлено и 2 удалено
  1. 12 0
      MBansheeEditor/ProjectWindow.cs
  2. 0 2
      TODO.txt

+ 12 - 0
MBansheeEditor/ProjectWindow.cs

@@ -925,6 +925,7 @@ namespace BansheeEditor
             scrollAreaPanel = contentScrollArea.Layout.AddPanel();
             scrollAreaPanel = contentScrollArea.Layout.AddPanel();
 
 
             RefreshDirectoryBar();
             RefreshDirectoryBar();
+            SortEntries(entriesToDisplay);
 
 
             if (entriesToDisplay.Length == 0)
             if (entriesToDisplay.Length == 0)
                 return;
                 return;
@@ -1085,6 +1086,17 @@ namespace BansheeEditor
             }
             }
         }
         }
 
 
+        private void SortEntries(LibraryEntry[] input)
+        {
+            Array.Sort(input, (x, y) =>
+            {
+                if (x.Type == y.Type)
+                    return x.Name.CompareTo(y.Name);
+                else
+                    return x.Type == LibraryEntryType.File ? 1 : -1;
+            });
+        }
+
         private void OnFolderButtonClicked(string path)
         private void OnFolderButtonClicked(string path)
         {
         {
             EnterDirectory(path);
             EnterDirectory(path);

+ 0 - 2
TODO.txt

@@ -31,9 +31,7 @@ Simple tasks:
  - Hook up scene view drag and drop instantiation
  - Hook up scene view drag and drop instantiation
 
 
 Test:
 Test:
- - See how are elements and search results ordered (should be by name)
  - Cut/Copy/Paste/Duplicate
  - Cut/Copy/Paste/Duplicate
- - Ping scroll and effect
 
 
 Later:
 Later:
  - Drag to select multiple entries?
  - Drag to select multiple entries?