Align SRP boundaries and editor windowing

This commit is contained in:
2026-04-26 17:14:32 +08:00
parent a8256b05cd
commit b8599a8aff
38 changed files with 696 additions and 650 deletions

View File

@@ -20,6 +20,20 @@ namespace {
using ::XCEngine::UI::UIDrawData;
using ::XCEngine::UI::UIDrawList;
class BuiltInIconResolver final : public UIEditorShellIconResolver {
public:
explicit BuiltInIconResolver(const BuiltInIcons& icons)
: m_icons(icons) {}
const ::XCEngine::UI::UITextureHandle* TryResolveIcon(
std::uint8_t iconKind) const override {
return &m_icons.Resolve(static_cast<BuiltInIconKind>(iconKind));
}
private:
const BuiltInIcons& m_icons;
};
UIEditorShellComposeModel BuildShellComposeModelFromFrame(
const UIEditorShellInteractionFrame& frame) {
UIEditorShellComposeModel model = {};
@@ -80,6 +94,7 @@ void EditorShellDrawComposer::Append(
const auto& palette = ResolveUIEditorShellInteractionPalette();
const UIEditorShellComposeModel shellComposeModel =
BuildShellComposeModelFromFrame(context.shellFrame);
const BuiltInIconResolver iconResolver(context.builtInIcons);
AppendDrawPacket(
drawData,
@@ -92,7 +107,7 @@ void EditorShellDrawComposer::Append(
context.shellInteractionState.composeState,
palette.shellPalette,
metrics.shellMetrics,
&context.builtInIcons);
&iconResolver);
});
AppendDrawPacket(
drawData,