From 8d9e3ded7459008f215f4755efa0cdb3d74108a2 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 12 Dec 2022 16:55:12 -0600 Subject: [PATCH 1/2] Remove sorting children in convtent view treeand make it so the game is on top, plugins in the middle, and engine at the bottom of the tree. This is for better UX. --- Source/Editor/Windows/ContentWindow.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index 22808a1f1..bb179f9e9 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -837,13 +837,19 @@ namespace FlaxEditor.Windows }; _root.Expand(true); + // Add game project on top, plugins in the middle and engine at bottom + _root.AddChild(Editor.ContentDatabase.Game); foreach (var project in Editor.ContentDatabase.Projects) + { + if (project == Editor.ContentDatabase.Game || project == Editor.ContentDatabase.Engine) + continue; _root.AddChild(project); + } + _root.AddChild(Editor.ContentDatabase.Engine); Editor.ContentDatabase.Game?.Expand(true); _tree.Margin = new Margin(0.0f, 0.0f, -16.0f, 2.0f); // Hide root node _tree.AddChild(_root); - _root.SortChildrenRecursive(); // Setup navigation _navigationUnlocked = true; From 7eab3fe5b367575b474a83f2ccddb6fc66e9766c Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 12 Dec 2022 18:18:48 -0600 Subject: [PATCH 2/2] Added back sorting sub project directories. --- Source/Editor/Windows/ContentWindow.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index bb179f9e9..3b1d0a11f 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -841,6 +841,7 @@ namespace FlaxEditor.Windows _root.AddChild(Editor.ContentDatabase.Game); foreach (var project in Editor.ContentDatabase.Projects) { + project.SortChildrenRecursive(); if (project == Editor.ContentDatabase.Game || project == Editor.ContentDatabase.Engine) continue; _root.AddChild(project);