Files
XCEngine/editor/app/Windowing/Content/EditorWindowContentController.cpp

42 lines
1.2 KiB
C++

#include "Windowing/Content/EditorWindowContentController.h"
#include "Composition/EditorContext.h"
#include "Windowing/EditorWindowShared.h"
#include <XCEngine/UI/DrawData.h>
namespace XCEngine::UI::Editor::App {
void EditorWindowContentController::PrepareEditorContext(
EditorContext& context,
UIEditorTextMeasurer& textMeasurer) {
context.AttachTextMeasurer(textMeasurer);
}
bool EditorWindowContentController::IsEditorContextValid(const EditorContext& context) const {
return context.IsValid();
}
void EditorWindowContentController::AppendInvalidFrame(
const EditorContext& context,
::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),
context.GetValidationMessage().empty()
? std::string("Unknown validation error.")
: context.GetValidationMessage(),
kShellMutedTextColor,
12.0f);
}
void EditorWindowContentController::NotifyStartupCaptureRequested(EditorContext& context) {
context.SetStatus("Capture", "Startup capture requested.");
}
} // namespace XCEngine::UI::Editor::App