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.

This commit is contained in:
2022-12-12 16:55:12 -06:00
parent 5a50656249
commit 8d9e3ded74
+7 -1
View File
@@ -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;