Initial commit

This commit is contained in:
Gericom
2025-11-22 17:21:45 +01:00
commit 5d6f67c612
517 changed files with 63025 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#include "common.h"
#include "core/mini-printf.h"
#include "material/MaterialColorSchemeFactory.h"
#include "Theme.h"
Theme::Theme(const TCHAR* folderName, const Rgb<8, 8, 8>& primaryColor, bool darkMode)
: _folderName(folderName)
{
MaterialColorSchemeFactory::FromPrimaryColor(primaryColor, darkMode, _materialColorScheme);
}
bool Theme::OpenThemeFile(File& file, const TCHAR* subPath) const
{
TCHAR pathBuffer[128];
mini_snprintf(pathBuffer, sizeof(pathBuffer), "/_pico/themes/%s/%s", _folderName.GetString(), subPath);
return file.Open(pathBuffer, FA_OPEN_EXISTING | FA_READ) == FR_OK;
}