feat: Add Debug Controls Card to Dungeon Editor V2
- Introduced a new Debug Controls card in the Dungeon Editor V2, allowing runtime control over debug logging and log levels. - Implemented UI elements for enabling/disabling debug logs, selecting log levels, and managing room rendering and texture processing. - Updated the DungeonEditorV2 class to include visibility management for the Debug Controls card and integrated it into the control panel. - Enhanced logging functionality in the LogManager to support runtime adjustments for debug logging.
This commit is contained in:
@@ -62,6 +62,19 @@ class LogManager {
|
||||
void log(LogLevel level, absl::string_view category,
|
||||
absl::string_view message);
|
||||
|
||||
/**
|
||||
* @brief Runtime log level control (for debug card)
|
||||
*/
|
||||
void SetLogLevel(LogLevel level) { min_level_.store(level); }
|
||||
LogLevel GetLogLevel() const { return min_level_.load(); }
|
||||
|
||||
/**
|
||||
* @brief Toggle debug logging on/off at runtime
|
||||
*/
|
||||
void EnableDebugLogging() { min_level_.store(LogLevel::YAZE_DEBUG); }
|
||||
void DisableDebugLogging() { min_level_.store(LogLevel::INFO); }
|
||||
bool IsDebugEnabled() const { return min_level_.load() == LogLevel::YAZE_DEBUG; }
|
||||
|
||||
private:
|
||||
LogManager();
|
||||
~LogManager();
|
||||
|
||||
Reference in New Issue
Block a user