// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. using FlaxEngine.GUI; namespace FlaxEditor.Content { /// /// Root tree node for the project workspace. /// /// public sealed class ProjectTreeNode : ContentTreeNode { /// /// The project/ /// public readonly ProjectInfo Project; /// /// The project content directory. /// public MainContentTreeNode Content; /// /// The project source code directory. /// public MainContentTreeNode Source; /// /// Initializes a new instance of the class. /// /// The project. public ProjectTreeNode(ProjectInfo project) : base(null, project.ProjectFolderPath) { Project = project; Folder.FileName = Folder.ShortName = Text = project.Name; } /// public override string NavButtonLabel => Project.Name; /// protected override void DoDragDrop() { // No drag for root nodes } /// public override int Compare(Control other) { // Move the main game project to the top if (Project.Name == Editor.Instance.GameProject.Name) return -1; return base.Compare(other); } } }