From 8d9e3ded7459008f215f4755efa0cdb3d74108a2 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Mon, 12 Dec 2022 16:55:12 -0600 Subject: [PATCH] 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;