Refactor XCUI editor module layout
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#ifndef NOMINMAX
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#include <XCEditor/Core/UIEditorPanelHostLifecycle.h>
|
||||
#include <XCEditor/Core/UIEditorWorkspaceController.h>
|
||||
#include <XCEditor/Shell/UIEditorPanelHostLifecycle.h>
|
||||
#include <XCEditor/Shell/UIEditorWorkspaceController.h>
|
||||
#include "Host/AutoScreenshot.h"
|
||||
#include "Host/NativeRenderer.h"
|
||||
|
||||
@@ -247,7 +247,7 @@ void DrawHostStateCard(
|
||||
if (!attached) {
|
||||
footer = "host 已 detached";
|
||||
} else if (!visible) {
|
||||
footer = "host 保留 attach,但当前不在屏幕上";
|
||||
footer = "host 保持 attached,但当前不在屏幕中";
|
||||
} else if (focused) {
|
||||
footer = "当前 host 已 visible + active + focused";
|
||||
} else if (active) {
|
||||
@@ -500,7 +500,8 @@ private:
|
||||
if (action == ActionId::Capture) {
|
||||
m_autoScreenshot.RequestCapture("manual_button");
|
||||
m_lastStatus = "Ready";
|
||||
m_lastMessage = "截图已排队,输出到 tests/UI/Editor/integration/state/panel_host_lifecycle/captures/。";
|
||||
m_lastMessage =
|
||||
"截图已排队,输出到 tests/UI/Editor/integration/state/panel_host_lifecycle/captures/。";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -560,10 +561,14 @@ private:
|
||||
UIDrawList& drawList = drawData.EmplaceDrawList("PanelHostLifecycle");
|
||||
drawList.AddFilledRect(UIRect(0.0f, 0.0f, width, height), kWindowBg);
|
||||
|
||||
DrawCard(drawList, m_introRect, "这个测试验证什么功能", "只验证 Editor panel host lifecycle contract,不做业务面板。");
|
||||
DrawCard(
|
||||
drawList,
|
||||
m_introRect,
|
||||
"这个测试验证什么功能?",
|
||||
"只验证 Editor panel host lifecycle contract,不做业务面板。");
|
||||
drawList.AddText(UIPoint(m_introRect.x + 18.0f, m_introRect.y + 72.0f), "1. 验证 attach/detach 由 panel open/close 驱动,而不是由 visible 驱动。", kTextPrimary, 12.0f);
|
||||
drawList.AddText(UIPoint(m_introRect.x + 18.0f, m_introRect.y + 94.0f), "2. 验证非选中 tab 依然 attached,但 visible=false。", kTextPrimary, 12.0f);
|
||||
drawList.AddText(UIPoint(m_introRect.x + 18.0f, m_introRect.y + 116.0f), "3. 验证 active 与 focused 是两层不同状态,focus 由外部 request 决定。", kTextPrimary, 12.0f);
|
||||
drawList.AddText(UIPoint(m_introRect.x + 18.0f, m_introRect.y + 116.0f), "3. 验证 active 和 focused 是两层不同状态,focus 由外部 request 决定。", kTextPrimary, 12.0f);
|
||||
drawList.AddText(UIPoint(m_introRect.x + 18.0f, m_introRect.y + 138.0f), "4. 验证 hide/close/reopen/activate 会输出稳定的 lifecycle events。", kTextPrimary, 12.0f);
|
||||
drawList.AddText(UIPoint(m_introRect.x + 18.0f, m_introRect.y + 164.0f), "建议操作:先看 doc-b 默认 attached 但 hidden;再点 Hide Active / Focus Active / Close Doc B / Open Doc B。", kTextWeak, 11.0f);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user