添加ui_editor编辑器模块初始代码

This commit is contained in:
2026-03-20 17:08:06 +08:00
parent c52b4ef35c
commit 376fa08e56
34 changed files with 2758 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#pragma once
#include "Core/LogEntry.h"
#include <vector>
#include <functional>
namespace UI {
class LogSystem {
public:
static LogSystem& Get();
void AddLog(LogEntry::Level 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;
};
}