new_editor: close editor-layer app boundary
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user