feat(new_editor): add project panel and polish dock chrome

This commit is contained in:
2026-04-11 20:20:30 +08:00
parent 030230eb1f
commit 0a015b52ca
12 changed files with 1455 additions and 52 deletions

View File

@@ -25,7 +25,7 @@ UIEditorPanelRegistry BuildPanelRegistry() {
{ "game", "Game", UIEditorPanelPresentationKind::ViewportShell, false, false, false },
{ "inspector", "Inspector", UIEditorPanelPresentationKind::Placeholder, true, false, false },
{ "console", "Console", UIEditorPanelPresentationKind::Placeholder, true, false, false },
{ "project", "Project", UIEditorPanelPresentationKind::Placeholder, true, false, false }
{ "project", "Project", UIEditorPanelPresentationKind::HostedContent, false, false, false }
};
return registry;
}
@@ -81,9 +81,9 @@ UIEditorWorkspaceModel BuildWorkspace() {
"project-panel",
"project",
"Project",
true)
false)
},
0u));
1u));
workspace.activePanelId = "scene";
return workspace;
}
@@ -434,6 +434,14 @@ UIEditorWorkspacePanelPresentationModel BuildViewportPresentation(
return presentation;
}
UIEditorWorkspacePanelPresentationModel BuildHostedContentPresentation(
std::string panelId) {
UIEditorWorkspacePanelPresentationModel presentation = {};
presentation.panelId = std::move(panelId);
presentation.kind = UIEditorPanelPresentationKind::HostedContent;
return presentation;
}
UIEditorShellInteractionDefinition BuildBaseShellDefinition() {
UIEditorShellInteractionDefinition definition = {};
definition.menuModel = BuildMenuModel();
@@ -449,7 +457,7 @@ UIEditorShellInteractionDefinition BuildBaseShellDefinition() {
BuildViewportPresentation("game", "Game", "Display 1", "Game preview host ready"),
BuildPlaceholderPresentation("inspector"),
BuildPlaceholderPresentation("console"),
BuildPlaceholderPresentation("project")
BuildHostedContentPresentation("project")
};
return definition;
}