refactor(new_editor/app): reorganize host structure and add smoke test
This commit is contained in:
76
new_editor/app/Composition/EditorShellAssetLayout.cpp
Normal file
76
new_editor/app/Composition/EditorShellAssetLayout.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
#include "EditorShellAssetBuilderSupport.h"
|
||||
|
||||
namespace XCEngine::UI::Editor::App::CompositionSupport {
|
||||
|
||||
UIEditorPanelRegistry BuildEditorPanelRegistry() {
|
||||
UIEditorPanelRegistry registry = {};
|
||||
registry.panels = {
|
||||
{ "hierarchy", "Hierarchy", UIEditorPanelPresentationKind::HostedContent, true, false, false },
|
||||
{ "scene", "Scene", UIEditorPanelPresentationKind::ViewportShell, false, false, false },
|
||||
{ "game", "Game", UIEditorPanelPresentationKind::ViewportShell, false, false, false },
|
||||
{ "inspector", "Inspector", UIEditorPanelPresentationKind::HostedContent, true, false, false },
|
||||
{ "console", "Console", UIEditorPanelPresentationKind::HostedContent, true, false, false },
|
||||
{ "project", "Project", UIEditorPanelPresentationKind::HostedContent, false, false, false }
|
||||
};
|
||||
return registry;
|
||||
}
|
||||
|
||||
UIEditorWorkspaceModel BuildEditorWorkspaceModel() {
|
||||
UIEditorWorkspaceModel workspace = {};
|
||||
workspace.root = BuildUIEditorWorkspaceSplit(
|
||||
"workspace-root",
|
||||
UIEditorWorkspaceSplitAxis::Vertical,
|
||||
0.75f,
|
||||
BuildUIEditorWorkspaceSplit(
|
||||
"workspace-top",
|
||||
UIEditorWorkspaceSplitAxis::Horizontal,
|
||||
0.7875f,
|
||||
BuildUIEditorWorkspaceSplit(
|
||||
"workspace-main",
|
||||
UIEditorWorkspaceSplitAxis::Horizontal,
|
||||
0.19047619f,
|
||||
BuildUIEditorWorkspaceSingleTabStack(
|
||||
"hierarchy-panel",
|
||||
"hierarchy",
|
||||
"Hierarchy",
|
||||
true),
|
||||
BuildUIEditorWorkspaceTabStack(
|
||||
"center-tabs",
|
||||
{
|
||||
BuildUIEditorWorkspacePanel(
|
||||
"scene-panel",
|
||||
"scene",
|
||||
"Scene",
|
||||
false),
|
||||
BuildUIEditorWorkspacePanel(
|
||||
"game-panel",
|
||||
"game",
|
||||
"Game",
|
||||
false)
|
||||
},
|
||||
0u)),
|
||||
BuildUIEditorWorkspaceSingleTabStack(
|
||||
"inspector-panel",
|
||||
"inspector",
|
||||
"Inspector",
|
||||
true)),
|
||||
BuildUIEditorWorkspaceTabStack(
|
||||
"bottom-tabs",
|
||||
{
|
||||
BuildUIEditorWorkspacePanel(
|
||||
"console-panel",
|
||||
"console",
|
||||
"Console",
|
||||
true),
|
||||
BuildUIEditorWorkspacePanel(
|
||||
"project-panel",
|
||||
"project",
|
||||
"Project",
|
||||
false)
|
||||
},
|
||||
1u));
|
||||
workspace.activePanelId = "scene";
|
||||
return workspace;
|
||||
}
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App::CompositionSupport
|
||||
Reference in New Issue
Block a user