Display "Applet Mode" indicator when running under an applet
This commit is contained in:
parent
78da39d0a2
commit
ce35f40f31
@ -46,6 +46,12 @@ const char* const g_strings[StrId_Max][16] =
|
|||||||
STR_TW("加載中…"),
|
STR_TW("加載中…"),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
[StrId_AppletMode] =
|
||||||
|
{
|
||||||
|
STR_EN("● Applet Mode ●"),
|
||||||
|
STR_ES("● Modo Applet ●"),
|
||||||
|
},
|
||||||
|
|
||||||
[StrId_Directory] =
|
[StrId_Directory] =
|
||||||
{
|
{
|
||||||
STR_EN("Directory"),
|
STR_EN("Directory"),
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
StrId_Loading = 0,
|
StrId_Loading = 0,
|
||||||
|
StrId_AppletMode,
|
||||||
StrId_Directory,
|
StrId_Directory,
|
||||||
StrId_DefaultPublisher,
|
StrId_DefaultPublisher,
|
||||||
StrId_IOError,
|
StrId_IOError,
|
||||||
|
@ -604,6 +604,12 @@ void menuLoop(void) {
|
|||||||
|
|
||||||
drawImage(40, 20, 140, 60, themeCurrent.hbmenuLogoImage, IMAGE_MODE_RGBA32);
|
drawImage(40, 20, 140, 60, themeCurrent.hbmenuLogoImage, IMAGE_MODE_RGBA32);
|
||||||
DrawText(interuiregular14, 180, 46 + 18, themeCurrent.textColor, VERSION);
|
DrawText(interuiregular14, 180, 46 + 18, themeCurrent.textColor, VERSION);
|
||||||
|
#ifdef __SWITCH__
|
||||||
|
AppletType at = appletGetAppletType();
|
||||||
|
if (at != AppletType_Application && at != AppletType_SystemApplication) {
|
||||||
|
DrawText(interuimedium30, 640-32, 46 + 18, themeCurrent.attentionTextColor, textGetString(StrId_AppletMode));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PERF_LOG_DRAW//Seperate from the PERF_LOG define since this might affect perf.
|
#ifdef PERF_LOG_DRAW//Seperate from the PERF_LOG define since this might affect perf.
|
||||||
extern u64 g_tickdiff_frame;
|
extern u64 g_tickdiff_frame;
|
||||||
|
@ -14,6 +14,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
themeGlobalPreset = preset;
|
themeGlobalPreset = preset;
|
||||||
theme_t themeLight = (theme_t) {
|
theme_t themeLight = (theme_t) {
|
||||||
.textColor = MakeColor(0, 0, 0, 255),
|
.textColor = MakeColor(0, 0, 0, 255),
|
||||||
|
.attentionTextColor = MakeColor(255, 0, 0, 255),
|
||||||
.frontWaveColor = MakeColor(100, 212, 250, 255),
|
.frontWaveColor = MakeColor(100, 212, 250, 255),
|
||||||
.middleWaveColor = MakeColor(100, 153, 255, 255),
|
.middleWaveColor = MakeColor(100, 153, 255, 255),
|
||||||
.backWaveColor = MakeColor(154, 171, 255, 255),
|
.backWaveColor = MakeColor(154, 171, 255, 255),
|
||||||
@ -37,6 +38,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
|
|
||||||
theme_t themeDark = (theme_t) {
|
theme_t themeDark = (theme_t) {
|
||||||
.textColor = MakeColor(255, 255, 255, 255),
|
.textColor = MakeColor(255, 255, 255, 255),
|
||||||
|
.attentionTextColor = MakeColor(255, 0, 0, 255),
|
||||||
.frontWaveColor = MakeColor(96, 204, 204, 255),
|
.frontWaveColor = MakeColor(96, 204, 204, 255),
|
||||||
.middleWaveColor = MakeColor(66, 154, 159, 255),
|
.middleWaveColor = MakeColor(66, 154, 159, 255),
|
||||||
.backWaveColor = MakeColor(73, 103, 169, 255),
|
.backWaveColor = MakeColor(73, 103, 169, 255),
|
||||||
@ -65,7 +67,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
config_t cfg = {0};
|
config_t cfg = {0};
|
||||||
config_init(&cfg);
|
config_init(&cfg);
|
||||||
config_setting_t *theme = NULL;
|
config_setting_t *theme = NULL;
|
||||||
color_t text, frontWave, middleWave, backWave, background, highlight, separator, borderColor, borderTextColor, progressBarColor;
|
color_t text, 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 good_cfg = false;
|
bool good_cfg = false;
|
||||||
@ -92,6 +94,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, "attentionTextColor"), &attentionText))
|
||||||
|
attentionText = themeDefault->attentionTextColor;
|
||||||
if (!colorFromSetting(config_setting_lookup(theme, "frontWaveColor"), &frontWave))
|
if (!colorFromSetting(config_setting_lookup(theme, "frontWaveColor"), &frontWave))
|
||||||
frontWave = themeDefault->frontWaveColor;
|
frontWave = themeDefault->frontWaveColor;
|
||||||
if (!colorFromSetting(config_setting_lookup(theme, "middleWaveColor"), &middleWave))
|
if (!colorFromSetting(config_setting_lookup(theme, "middleWaveColor"), &middleWave))
|
||||||
@ -130,6 +134,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
starOffText = themeDefault->labelStarOffText;
|
starOffText = themeDefault->labelStarOffText;
|
||||||
themeCurrent = (theme_t) {
|
themeCurrent = (theme_t) {
|
||||||
.textColor = text,
|
.textColor = text,
|
||||||
|
.attentionTextColor = attentionText,
|
||||||
.frontWaveColor = frontWave,
|
.frontWaveColor = frontWave,
|
||||||
.middleWaveColor = middleWave,
|
.middleWaveColor = middleWave,
|
||||||
.backWaveColor = backWave,
|
.backWaveColor = backWave,
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
color_t textColor;
|
color_t textColor;
|
||||||
|
color_t attentionTextColor;
|
||||||
color_t frontWaveColor;
|
color_t frontWaveColor;
|
||||||
color_t middleWaveColor;
|
color_t middleWaveColor;
|
||||||
color_t backWaveColor;
|
color_t backWaveColor;
|
||||||
|
Loading…
Reference in New Issue
Block a user