Refactor XCUI editor module layout

This commit is contained in:
2026-04-10 00:41:28 +08:00
parent 4b47764f26
commit 02a0e626fe
263 changed files with 12396 additions and 7592 deletions

View File

@@ -2,7 +2,7 @@
#define NOMINMAX
#endif
#include <XCEditor/Widgets/UIEditorPanelFrame.h>
#include <XCEditor/Shell/UIEditorPanelFrame.h>
#include "Host/AutoScreenshot.h"
#include "Host/NativeRenderer.h"
@@ -375,7 +375,7 @@ private:
{ ActionId::ToggleFooter, "Footer", UIRect(left, top, width, buttonHeight), m_state.showFooter },
{ ActionId::TogglePin, "Pin Button", UIRect(left, top + (buttonHeight + gap), width, buttonHeight), m_state.pinnable },
{ ActionId::ToggleClose, "Close Button", UIRect(left, top + (buttonHeight + gap) * 2.0f, width, buttonHeight), m_state.closable },
{ ActionId::Reset, "Reset", UIRect(left, top + (buttonHeight + gap) * 3.0f, width, buttonHeight), false }
{ ActionId::Reset, "重置", UIRect(left, top + (buttonHeight + gap) * 3.0f, width, buttonHeight), false }
};
}
@@ -405,25 +405,30 @@ private:
DrawCard(
drawList,
introRect,
"测试功能PanelFrame 基础壳层",
"重点检查Header / Body / Footer 布局Active / Focus 边框Pin / Close 命中。");
"这个测试验证什么功能?",
"验证 PanelFrame 的 header/body/footer 分区,以及 active、focus、pin、close 命中。");
drawList.AddText(
UIPoint(introRect.x + 16.0f, introRect.y + 66.0f),
"操作:移动鼠标观察 hover点 Header 切 Active点 Body/Footer 取 Focus点 Pin/Close 看 Result按 F12 截图",
"1. hover 各区域,检查命中 part 是否正确",
kTextMuted,
12.0f);
drawList.AddText(
UIPoint(introRect.x + 16.0f, introRect.y + 90.0f),
"这个场景只验证 Editor 基础层 PanelFrame不包含任何业务面板",
"2. 点击 Header、Body、Footer、Pin、Close检查状态变化",
kTextMuted,
12.0f);
drawList.AddText(
UIPoint(introRect.x + 16.0f, introRect.y + 114.0f),
"3. 右侧只放一个 PanelFrame不接业务面板。",
kTextWeak,
12.0f);
DrawCard(drawList, controlsRect, "开关", "这里只保留基础状态开关,避免试验面板过杂");
DrawCard(drawList, controlsRect, "操作", "只保留影响 PanelFrame contract 的开关");
for (const ButtonState& button : m_buttons) {
DrawButton(drawList, button);
}
DrawCard(drawList, stateRect, "状态", "右侧面板的命中结果和状态变化会同步显示在这里");
DrawCard(drawList, stateRect, "状态摘要", "重点看 hover、active、focus、pinned 和结果");
drawList.AddText(
UIPoint(stateRect.x + 16.0f, stateRect.y + 66.0f),
"Hover: " + DescribePart(m_hoveredPart),