MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Refresh

Method Refresh

Source/Editor/Windows/ContentWindow.cs:1634–1673  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1632 }
1633
1634 private void Refresh()
1635 {
1636 // Setup content root node
1637 _root = new RootContentFolderTreeNode
1638 {
1639 ChildrenIndent = 0
1640 };
1641 _root.Expand(true);
1642
1643 // Add game project on top, plugins in the middle and engine at bottom
1644 _root.AddChild(Editor.ContentDatabase.Game);
1645 Editor.ContentDatabase.Projects.Sort();
1646 foreach (var project in Editor.ContentDatabase.Projects)
1647 {
1648 project.SortChildrenRecursive();
1649 if (project == Editor.ContentDatabase.Game || project == Editor.ContentDatabase.Engine)
1650 continue;
1651 project.Visible = _showPluginsFiles;
1652 project.Folder.Visible = _showPluginsFiles;
1653 _root.AddChild(project);
1654 }
1655 Editor.ContentDatabase.Engine.Visible = _showEngineFiles;
1656 Editor.ContentDatabase.Engine.Folder.Visible = _showEngineFiles;
1657 _root.AddChild(Editor.ContentDatabase.Engine);
1658
1659 Editor.ContentDatabase.Game?.Expand(true);
1660 _tree.Margin = new Margin(0.0f, 0.0f, -16.0f, ScrollBar.DefaultSize + 2); // Hide root node
1661 _tree.AddChild(_root);
1662
1663 // Setup navigation
1664 _navigationUnlocked = true;
1665 _tree.Select(_root);
1666 NavigationClearHistory();
1667
1668 // Update UI layout
1669 _isLayoutLocked = false;
1670 PerformLayout();
1671 ApplyExpandedFolders();
1672 ApplyTreeViewMode();
1673 }
1674
1675 /// <inheritdoc />
1676 public override void Update(float deltaTime)

Callers

nothing calls this directly

Calls 5

SortChildrenRecursiveMethod · 0.80
ExpandMethod · 0.45
AddChildMethod · 0.45
SortMethod · 0.45
SelectMethod · 0.45

Tested by

no test coverage detected