new_editor: close editor-layer app boundary

This commit is contained in:
2026-04-22 16:24:59 +08:00
parent a805803858
commit 2c2a8b8669
25 changed files with 1036 additions and 439 deletions

View File

@@ -1,6 +1,5 @@
#include "ConsolePanel.h"
#include "Composition/EditorPanelIds.h"
#include <XCEditor/Foundation/UIEditorTheme.h>
#include <algorithm>
@@ -31,23 +30,10 @@ float ResolveTextTop(float rectY, float rectHeight, float fontSize) {
} // namespace
const UIEditorPanelContentHostPanelState* ConsolePanel::FindMountedConsolePanel(
const UIEditorPanelContentHostFrame& contentHostFrame) const {
for (const UIEditorPanelContentHostPanelState& panelState : contentHostFrame.panelStates) {
if (panelState.panelId == kConsolePanelId && panelState.mounted) {
return &panelState;
}
}
return nullptr;
}
void ConsolePanel::Update(
const EditorSession& session,
const UIEditorPanelContentHostFrame& contentHostFrame) {
const UIEditorPanelContentHostPanelState* panelState =
FindMountedConsolePanel(contentHostFrame);
if (panelState == nullptr) {
const UIEditorHostedPanelDispatchEntry& dispatchEntry) {
if (!dispatchEntry.mounted) {
m_visible = false;
m_bounds = {};
m_entries = nullptr;
@@ -55,7 +41,7 @@ void ConsolePanel::Update(
}
m_visible = true;
m_bounds = panelState->bounds;
m_bounds = dispatchEntry.bounds;
m_entries = &session.consoleEntries;
}