Add theme management and background rendering features

- Introduced a comprehensive theme management system, allowing users to load, save, and switch between multiple themes.
- Added support for various built-in themes, enhancing the visual customization of the application.
- Implemented a background renderer for improved visual effects in docking windows, including grid backgrounds and subtle animations.
- Enhanced the EditorManager UI with themed elements, providing a more cohesive and engaging user experience.
- Updated CMake configuration to include new theme and background renderer source files, ensuring proper integration into the build system.
This commit is contained in:
scawful
2025-09-26 19:32:19 -04:00
parent dedbe078d3
commit 997092390a
20 changed files with 2093 additions and 26 deletions

View File

@@ -14,7 +14,12 @@
namespace yaze {
namespace util {
static const std::string kLogFileOut = "yaze_log.txt";
static std::string g_log_file_path = "yaze_log.txt";
// Set custom log file path
inline void SetLogFile(const std::string& filepath) {
g_log_file_path = filepath;
}
template <typename... Args>
static void logf(const absl::FormatSpec<Args...> &format, const Args &...args) {
@@ -29,8 +34,20 @@ static void logf(const absl::FormatSpec<Args...> &format, const Args &...args) {
if (core::FeatureFlags::get().kLogToConsole) {
std::cout << message;
}
static std::ofstream fout(kLogFileOut, std::ios::out | std::ios::app);
// Use the configurable log file path
static std::ofstream fout;
static std::string last_log_path = "";
// Reopen file if path changed
if (g_log_file_path != last_log_path) {
fout.close();
fout.open(g_log_file_path, std::ios::out | std::ios::app);
last_log_path = g_log_file_path;
}
fout << message;
fout.flush(); // Ensure immediate write for debugging
}
} // namespace util