Files
XCEngine/ui_editor/src/Managers/LogSystem.h
ssdfasd a40544344b 重构ui_editor:向引擎核心类型对齐
- 删除UI::Event,使用XCEngine::Core::Event替代
- GameObject.h重构,Component添加friend class Entity
- LogEntry使用XCEngine::Debug::LogLevel
- SceneManager/SelectionManager使用XCEngine::Core::Event
- LogSystem使用XCEngine::Debug::LogLevel
- CMakeLists.txt添加engine/include路径
2026-03-20 17:28:06 +08:00

27 lines
527 B
C++

#pragma once
#include "Core/LogEntry.h"
#include <vector>
#include <functional>
namespace UI {
class LogSystem {
public:
static LogSystem& Get();
void AddLog(XCEngine::Debug::LogLevel level, const std::string& message);
void Clear();
const std::vector<LogEntry>& GetLogs() const { return m_logs; }
void SetCallback(std::function<void()> callback) { m_callback = callback; }
private:
LogSystem() = default;
std::vector<LogEntry> m_logs;
std::function<void()> m_callback;
};
}