#include #include #include #include #include #include #include #include namespace { using XCEngine::UI::Runtime::UIScreenAsset; using XCEngine::UI::Runtime::UIScreenFrameInput; using XCEngine::UI::Runtime::UIScreenPlayer; using XCEngine::UI::Runtime::UIDocumentScreenHost; using XCEngine::UI::Runtime::UISystem; namespace fs = std::filesystem; class TempFileScope { public: TempFileScope(std::string stem, std::string extension, std::string contents) { const auto uniqueId = std::to_string( std::chrono::steady_clock::now().time_since_epoch().count()); m_path = fs::temp_directory_path() / (std::move(stem) + "_" + uniqueId + std::move(extension)); std::ofstream output(m_path, std::ios::binary | std::ios::trunc); output << contents; } ~TempFileScope() { std::error_code ec; fs::remove(m_path, ec); } const fs::path& Path() const { return m_path; } private: fs::path m_path = {}; }; std::string BuildViewMarkup(const char* heroTitle, const char* overlayText = nullptr) { std::string markup = "\n" " \n" " \n" " \n" " \n" "