2026-04-27 19:16:08 +08:00
|
|
|
#include "Content/EditorWindowContentController.h"
|
2026-04-26 16:01:07 +08:00
|
|
|
|
2026-04-27 19:16:08 +08:00
|
|
|
#include "EditorWindowVisuals.h"
|
2026-04-26 16:01:07 +08:00
|
|
|
|
|
|
|
|
#include <XCEngine/UI/DrawData.h>
|
|
|
|
|
|
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
|
|
2026-04-27 23:45:24 +08:00
|
|
|
void EditorWindowContentController::PrepareFrameServices(
|
|
|
|
|
EditorFrameServices& frameServices,
|
2026-04-26 16:01:07 +08:00
|
|
|
UIEditorTextMeasurer& textMeasurer) {
|
2026-04-27 23:45:24 +08:00
|
|
|
frameServices.AttachTextMeasurer(textMeasurer);
|
2026-04-26 16:01:07 +08:00
|
|
|
}
|
|
|
|
|
|
2026-04-27 23:45:24 +08:00
|
|
|
bool EditorWindowContentController::AreFrameServicesValid(
|
|
|
|
|
const EditorFrameServices& frameServices) const {
|
|
|
|
|
return frameServices.IsValid();
|
2026-04-26 16:01:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EditorWindowContentController::AppendInvalidFrame(
|
2026-04-27 23:45:24 +08:00
|
|
|
const EditorFrameServices& frameServices,
|
2026-04-26 16:01:07 +08:00
|
|
|
::XCEngine::UI::UIDrawList& drawList) const {
|
|
|
|
|
drawList.AddText(
|
|
|
|
|
::XCEngine::UI::UIPoint(28.0f, 28.0f),
|
|
|
|
|
"Editor shell asset invalid.",
|
|
|
|
|
kShellTextColor,
|
|
|
|
|
16.0f);
|
|
|
|
|
drawList.AddText(
|
|
|
|
|
::XCEngine::UI::UIPoint(28.0f, 54.0f),
|
2026-04-27 23:45:24 +08:00
|
|
|
frameServices.GetValidationMessage().empty()
|
2026-04-26 16:01:07 +08:00
|
|
|
? std::string("Unknown validation error.")
|
2026-04-27 23:45:24 +08:00
|
|
|
: frameServices.GetValidationMessage(),
|
2026-04-26 16:01:07 +08:00
|
|
|
kShellMutedTextColor,
|
|
|
|
|
12.0f);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-27 23:45:24 +08:00
|
|
|
void EditorWindowContentController::NotifyStartupCaptureRequested(
|
|
|
|
|
EditorFrameServices& frameServices) {
|
|
|
|
|
frameServices.SetStatus("Capture", "Startup capture requested.");
|
2026-04-26 16:01:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|