Display '{button} {text}' for netloader. Added theme handling for this. StrId_NetLoader is used for this, with '3dslink' removed from the text.
This commit is contained in:
parent
b28ddcaddc
commit
80e2e0aae7
@ -731,23 +731,23 @@ const char* const g_strings[StrId_Max][16] =
|
|||||||
),
|
),
|
||||||
},*/
|
},*/
|
||||||
|
|
||||||
/*[StrId_NetLoader] =
|
[StrId_NetLoader] =
|
||||||
{
|
{
|
||||||
STR_EN("3dslink NetLoader"),
|
STR_EN("NetLoader"),
|
||||||
STR_ES("Cargador de programas 3dslink"),
|
STR_ES("Cargador de programas"),
|
||||||
STR_DE("3dslink Netzwerk-Loader"),
|
STR_DE("Netzwerk-Loader"),
|
||||||
STR_FR("Chargeur de programme 3dslink"),
|
STR_FR("Chargeur de programme"),
|
||||||
STR_IT("Caricamento programmi 3dslink"),
|
STR_IT("Caricamento programmi"),
|
||||||
STR_JP("3dslinkネットローダ"),
|
STR_JP("ネットローダ"),
|
||||||
STR_PT("Carregador de programas 3dslink"),
|
STR_PT("Carregador de programas"),
|
||||||
STR_NL("3dslink netwerk lader"),
|
STR_NL("netwerk lader"),
|
||||||
STR_KO("3dslink 네트워크 로더"),
|
STR_KO("네트워크 로더"),
|
||||||
STR_RU("Загрузчик 3dslink"),
|
STR_RU("Загрузчик"),
|
||||||
STR_ZH("3dslink 网络执行模块"),
|
STR_ZH("网络执行模块"),
|
||||||
STR_TW("3dslink 網路執行模組"),
|
STR_TW("網路執行模組"),
|
||||||
},
|
},
|
||||||
|
|
||||||
[StrId_NetLoaderUnavailable] =
|
/*[StrId_NetLoaderUnavailable] =
|
||||||
{
|
{
|
||||||
STR_EN("The NetLoader is currently unavailable."),
|
STR_EN("The NetLoader is currently unavailable."),
|
||||||
STR_ES("El cargador de programas no está disponible."),
|
STR_ES("El cargador de programas no está disponible."),
|
||||||
|
@ -456,7 +456,7 @@ void drawCharge() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawBackBtn(menu_s* menu, bool emptyDir) {
|
void drawButtons(menu_s* menu, bool emptyDir, int *x_image_out) {
|
||||||
int x_image = 1280 - 252 - 30 - 32;
|
int x_image = 1280 - 252 - 30 - 32;
|
||||||
int x_text = 1280 - 216 - 30 - 32;
|
int x_text = 1280 - 216 - 30 - 32;
|
||||||
|
|
||||||
@ -475,6 +475,16 @@ void drawBackBtn(menu_s* menu, bool emptyDir) {
|
|||||||
DrawText(fontscale7, x_image, 720 - 47 + 26, themeCurrent.textColor, themeCurrent.buttonBText);//Display the 'B' button from SharedFont.
|
DrawText(fontscale7, x_image, 720 - 47 + 26, themeCurrent.textColor, themeCurrent.buttonBText);//Display the 'B' button from SharedFont.
|
||||||
DrawText(interuimedium20, x_text, 720 - 47 + 26, themeCurrent.textColor, textGetString(StrId_Actions_Back));
|
DrawText(interuimedium20, x_text, 720 - 47 + 26, themeCurrent.textColor, textGetString(StrId_Actions_Back));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(hbmenu_state == HBMENU_DEFAULT)
|
||||||
|
{
|
||||||
|
x_text = GetTextXCoordinate(interuiregular18, x_image - 32, textGetString(StrId_NetLoader), 'r');
|
||||||
|
x_image = x_text - 36;
|
||||||
|
*x_image_out = x_image - 40;
|
||||||
|
|
||||||
|
DrawText(fontscale7, x_image, 720 - 47 + 26, themeCurrent.textColor, themeCurrent.buttonYText);
|
||||||
|
DrawText(interuiregular18, x_text, 720 - 47 + 26, themeCurrent.textColor, textGetString(StrId_NetLoader));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void menuLoop(void) {
|
void menuLoop(void) {
|
||||||
@ -482,6 +492,7 @@ void menuLoop(void) {
|
|||||||
menu_s* menu = menuGetCurrent();
|
menu_s* menu = menuGetCurrent();
|
||||||
int i;
|
int i;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
int menupath_x_endpos = 918 + 40;
|
||||||
|
|
||||||
for (y=0; y<450; y++) {
|
for (y=0; y<450; y++) {
|
||||||
for (x=0; x<1280; x+=4) {// don't draw bottom pixels as they are covered by the waves
|
for (x=0; x<1280; x+=4) {// don't draw bottom pixels as they are covered by the waves
|
||||||
@ -496,7 +507,6 @@ 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);
|
||||||
DrawTextTruncate(interuiregular18, 40, 720 - 47 + 24, themeCurrent.textColor, menu->dirname, 918, "...");
|
|
||||||
|
|
||||||
#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_vsync;
|
extern u64 g_tickdiff_vsync;
|
||||||
@ -531,7 +541,7 @@ void menuLoop(void) {
|
|||||||
} else {
|
} else {
|
||||||
DrawText(interuiregular14, 64, 128 + 18, themeCurrent.textColor, textGetString(StrId_NoAppsFound_Msg));
|
DrawText(interuiregular14, 64, 128 + 18, themeCurrent.textColor, textGetString(StrId_NoAppsFound_Msg));
|
||||||
}
|
}
|
||||||
drawBackBtn(menu, true);
|
drawButtons(menu, true, &menupath_x_endpos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -589,8 +599,10 @@ void menuLoop(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drawBackBtn(menu, false);
|
drawButtons(menu, false, &menupath_x_endpos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DrawTextTruncate(interuiregular18, 40, 720 - 47 + 24, themeCurrent.textColor, menu->dirname, menupath_x_endpos - 40, "...");
|
||||||
|
|
||||||
menuDrawMsgBox();
|
menuDrawMsgBox();
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
.enableWaveBlending = 0,
|
.enableWaveBlending = 0,
|
||||||
.buttonAText = "\uE0E0",
|
.buttonAText = "\uE0E0",
|
||||||
.buttonBText = "\uE0E1",
|
.buttonBText = "\uE0E1",
|
||||||
|
.buttonYText = "\uE0E3",
|
||||||
.buttonPText = "\uE0EF",
|
.buttonPText = "\uE0EF",
|
||||||
.buttonMText = "\uE0F0",
|
.buttonMText = "\uE0F0",
|
||||||
.hbmenuLogoImage = hbmenu_logo_light_bin
|
.hbmenuLogoImage = hbmenu_logo_light_bin
|
||||||
@ -49,6 +50,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
.enableWaveBlending = 0,
|
.enableWaveBlending = 0,
|
||||||
.buttonAText = "\uE0A0",
|
.buttonAText = "\uE0A0",
|
||||||
.buttonBText = "\uE0A1",
|
.buttonBText = "\uE0A1",
|
||||||
|
.buttonYText = "\uE0A3",
|
||||||
.buttonPText = "\uE0B3",
|
.buttonPText = "\uE0B3",
|
||||||
.buttonMText = "\uE0B4",
|
.buttonMText = "\uE0B4",
|
||||||
.hbmenuLogoImage = hbmenu_logo_dark_bin
|
.hbmenuLogoImage = hbmenu_logo_dark_bin
|
||||||
@ -63,7 +65,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
config_setting_t *theme = NULL;
|
config_setting_t *theme = NULL;
|
||||||
color_t text, frontWave, middleWave, backWave, background, highlight, separator, borderColor, borderTextColor;
|
color_t text, frontWave, middleWave, backWave, background, highlight, separator, borderColor, borderTextColor;
|
||||||
int waveBlending;
|
int waveBlending;
|
||||||
const char *AText, *BText, *PText, *MText;
|
const char *AText, *BText, *YText, *PText, *MText;
|
||||||
bool good_cfg = false;
|
bool good_cfg = false;
|
||||||
|
|
||||||
if(themePath[0]!=0)
|
if(themePath[0]!=0)
|
||||||
@ -110,6 +112,8 @@ void themeStartup(ThemePreset preset) {
|
|||||||
AText = themeDefault->buttonAText;
|
AText = themeDefault->buttonAText;
|
||||||
if (!config_setting_lookup_string(theme, "buttonBText", &BText))
|
if (!config_setting_lookup_string(theme, "buttonBText", &BText))
|
||||||
BText = themeDefault->buttonBText;
|
BText = themeDefault->buttonBText;
|
||||||
|
if (!config_setting_lookup_string(theme, "buttonYText", &YText))
|
||||||
|
YText = themeDefault->buttonYText;
|
||||||
if (!config_setting_lookup_string(theme, "buttonPText", &PText))
|
if (!config_setting_lookup_string(theme, "buttonPText", &PText))
|
||||||
PText = themeDefault->buttonPText;
|
PText = themeDefault->buttonPText;
|
||||||
if (!config_setting_lookup_string(theme, "buttonMText", &MText))
|
if (!config_setting_lookup_string(theme, "buttonMText", &MText))
|
||||||
@ -129,6 +133,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
};
|
};
|
||||||
strncpy(themeCurrent.buttonAText, AText, sizeof(themeCurrent.buttonAText)-1);
|
strncpy(themeCurrent.buttonAText, AText, sizeof(themeCurrent.buttonAText)-1);
|
||||||
strncpy(themeCurrent.buttonBText, BText, sizeof(themeCurrent.buttonBText)-1);
|
strncpy(themeCurrent.buttonBText, BText, sizeof(themeCurrent.buttonBText)-1);
|
||||||
|
strncpy(themeCurrent.buttonYText, YText, sizeof(themeCurrent.buttonYText)-1);
|
||||||
strncpy(themeCurrent.buttonPText, PText, sizeof(themeCurrent.buttonPText)-1);
|
strncpy(themeCurrent.buttonPText, PText, sizeof(themeCurrent.buttonPText)-1);
|
||||||
strncpy(themeCurrent.buttonMText, MText, sizeof(themeCurrent.buttonMText)-1);
|
strncpy(themeCurrent.buttonMText, MText, sizeof(themeCurrent.buttonMText)-1);
|
||||||
} else {
|
} else {
|
||||||
|
@ -17,6 +17,7 @@ typedef struct
|
|||||||
bool enableWaveBlending;
|
bool enableWaveBlending;
|
||||||
char buttonAText[32];
|
char buttonAText[32];
|
||||||
char buttonBText[32];
|
char buttonBText[32];
|
||||||
|
char buttonYText[32];
|
||||||
char buttonPText[32];
|
char buttonPText[32];
|
||||||
char buttonMText[32];
|
char buttonMText[32];
|
||||||
const uint8_t *hbmenuLogoImage;
|
const uint8_t *hbmenuLogoImage;
|
||||||
|
Loading…
Reference in New Issue
Block a user