Added logoColor to the theme config.
This commit is contained in:
parent
d11585589e
commit
9eda227d33
@ -674,7 +674,14 @@ void menuLoop(void) {
|
|||||||
if (layoutobj->visible) drawWave(2, menuTimer, themeCurrent.frontWaveColor, layoutobj->size[1], 4.0, -2.5);
|
if (layoutobj->visible) drawWave(2, menuTimer, themeCurrent.frontWaveColor, layoutobj->size[1], 4.0, -2.5);
|
||||||
menuTimer += 0.05;
|
menuTimer += 0.05;
|
||||||
|
|
||||||
drawImageFromLayout(ThemeLayoutId_Logo, themeCurrent.hbmenuLogoImage, IMAGE_MODE_RGBA32);
|
if (!themeCurrent.logoColor_set)
|
||||||
|
drawImageFromLayout(ThemeLayoutId_Logo, themeCurrent.hbmenuLogoImage, IMAGE_MODE_RGBA32);
|
||||||
|
else {
|
||||||
|
layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_Logo];
|
||||||
|
assetsGetData(AssetId_hbmenu_logo_light, &data);
|
||||||
|
if (layoutobj->visible) drawIcon(layoutobj->posStart[0], layoutobj->posStart[1], data->imageSize[0], data->imageSize[1], data->buffer, themeCurrent.logoColor);
|
||||||
|
}
|
||||||
|
|
||||||
DrawTextFromLayout(ThemeLayoutId_HbmenuVersion, themeCurrent.textColor, VERSION);
|
DrawTextFromLayout(ThemeLayoutId_HbmenuVersion, themeCurrent.textColor, VERSION);
|
||||||
u32 statusXPos = drawStatus();
|
u32 statusXPos = drawStatus();
|
||||||
|
|
||||||
|
@ -416,9 +416,10 @@ void themeStartup(ThemePreset preset) {
|
|||||||
config_t cfg = {0};
|
config_t cfg = {0};
|
||||||
config_init(&cfg);
|
config_init(&cfg);
|
||||||
config_setting_t *theme = NULL, *layout = NULL, *assets = NULL;
|
config_setting_t *theme = NULL, *layout = NULL, *assets = NULL;
|
||||||
color_t text, attentionText, frontWave, middleWave, backWave, background, highlight, separator, borderColor, borderTextColor, progressBarColor;
|
color_t text, logoColor={0}, attentionText, frontWave, middleWave, backWave, background, highlight, separator, borderColor, borderTextColor, progressBarColor;
|
||||||
int waveBlending;
|
int waveBlending;
|
||||||
const char *AText, *BText, *XText, *YText, *PText, *MText, *starOnText, *starOffText;
|
const char *AText, *BText, *XText, *YText, *PText, *MText, *starOnText, *starOffText;
|
||||||
|
bool logoColor_set = false;
|
||||||
bool good_cfg = false;
|
bool good_cfg = false;
|
||||||
bool is_romfs = false;
|
bool is_romfs = false;
|
||||||
|
|
||||||
@ -460,6 +461,8 @@ void themeStartup(ThemePreset preset) {
|
|||||||
if (theme != NULL) {
|
if (theme != NULL) {
|
||||||
if (!colorFromSetting(config_setting_lookup(theme, "textColor"), &text))
|
if (!colorFromSetting(config_setting_lookup(theme, "textColor"), &text))
|
||||||
text = themeDefault->textColor;
|
text = themeDefault->textColor;
|
||||||
|
if (colorFromSetting(config_setting_lookup(theme, "logoColor"), &logoColor))
|
||||||
|
logoColor_set = true;
|
||||||
if (!colorFromSetting(config_setting_lookup(theme, "attentionTextColor"), &attentionText))
|
if (!colorFromSetting(config_setting_lookup(theme, "attentionTextColor"), &attentionText))
|
||||||
attentionText = themeDefault->attentionTextColor;
|
attentionText = themeDefault->attentionTextColor;
|
||||||
if (!colorFromSetting(config_setting_lookup(theme, "frontWaveColor"), &frontWave))
|
if (!colorFromSetting(config_setting_lookup(theme, "frontWaveColor"), &frontWave))
|
||||||
@ -500,6 +503,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
starOffText = themeDefault->labelStarOffText;
|
starOffText = themeDefault->labelStarOffText;
|
||||||
themeCurrent = (theme_t) {
|
themeCurrent = (theme_t) {
|
||||||
.textColor = text,
|
.textColor = text,
|
||||||
|
.logoColor = logoColor,
|
||||||
.attentionTextColor = attentionText,
|
.attentionTextColor = attentionText,
|
||||||
.frontWaveColor = frontWave,
|
.frontWaveColor = frontWave,
|
||||||
.middleWaveColor = middleWave,
|
.middleWaveColor = middleWave,
|
||||||
@ -510,6 +514,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
.borderColor = borderColor,
|
.borderColor = borderColor,
|
||||||
.borderTextColor = borderTextColor,
|
.borderTextColor = borderTextColor,
|
||||||
.progressBarColor = progressBarColor,
|
.progressBarColor = progressBarColor,
|
||||||
|
.logoColor_set = logoColor_set,
|
||||||
.enableWaveBlending = waveBlending,
|
.enableWaveBlending = waveBlending,
|
||||||
.hbmenuLogoImage = themeDefault->hbmenuLogoImage
|
.hbmenuLogoImage = themeDefault->hbmenuLogoImage
|
||||||
};
|
};
|
||||||
|
@ -26,6 +26,7 @@ typedef struct
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
color_t textColor;
|
color_t textColor;
|
||||||
|
color_t logoColor;
|
||||||
color_t attentionTextColor;
|
color_t attentionTextColor;
|
||||||
color_t frontWaveColor;
|
color_t frontWaveColor;
|
||||||
color_t middleWaveColor;
|
color_t middleWaveColor;
|
||||||
@ -36,6 +37,7 @@ typedef struct
|
|||||||
color_t borderColor;
|
color_t borderColor;
|
||||||
color_t borderTextColor;
|
color_t borderTextColor;
|
||||||
color_t progressBarColor;
|
color_t progressBarColor;
|
||||||
|
bool logoColor_set;
|
||||||
bool enableWaveBlending;
|
bool enableWaveBlending;
|
||||||
char buttonAText[32];
|
char buttonAText[32];
|
||||||
char buttonBText[32];
|
char buttonBText[32];
|
||||||
|
Loading…
Reference in New Issue
Block a user