You've already forked pico-launcher
mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-01-09 16:28:48 -08:00
18 lines
613 B
C++
18 lines
613 B
C++
|
|
#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;
|
||
|
|
}
|