- cover banner menu using main config buttons.

- other misc config menu changes.
This commit is contained in:
Fledge68 2022-07-05 13:22:03 -05:00
parent 24e5e28abb
commit 1e16afc5bf
6 changed files with 54 additions and 86 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

After

Width:  |  Height:  |  Size: 4.3 MiB

View File

@ -1978,10 +1978,13 @@ void CMenu::_updateText(void)
_textPluginSettings();
_textCategorySettings();
_textCheatSettings();
_textConfigGC();
_textPartitionsCfg();
_textConfig();
_textConfigGC();
_textConfigHB();
_textConfigSrc();
_textBoot();
_textCoverBanner();
_textGame();
_textDownload();
_textCode();
@ -1991,8 +1994,6 @@ void CMenu::_updateText(void)
_textHome();
_textExitTo();
_textShutdown();
_textBoot();
_textCoverBanner();
_textExplorer();
_textWad();
_textCheckboxesMenu();

View File

@ -927,36 +927,36 @@ private:
void _hideError(bool instant = false);
void _hideMain(bool instant = false);
void _hideConfigMain(bool instant = true);
void _hideConfigButtons(bool instant = false);
void _hideConfigButtons(bool instant = true);
void _hideConfigGC(bool instant = true);
void _hideConfigHB(bool instant = true);
void _hideConfigSrc(bool instant = true);
void _hideBoot(bool instant = true);
void _hideCoverBanner(bool instant = true);
void _hidePartitionsCfg(bool instant = false);
void _hideGame(bool instant = false);
void _hidePaths(bool instant = false);
void _hideNandEmu(bool instant = false);
void _hideNandEmuPg();
void _hideDownload(bool instant = false);
void _hideSettings(bool instant = false);
void _hideCode(bool instant = false);
void _hideAbout(bool instant = false);
void _hideBoot(bool instant = true);
void _hideWBFS(bool instant = false);
void _hideCFTheme(bool instant = false);
void _hideGameSettings(bool instant = false);
void _hideGameSettingsPg(bool instant = false);
void _hideSource(bool instant = false);
void _hideCheckboxesMenu(bool instant = false);
void _hideSM_Editor(bool instant = false);
void _hidePluginSettings(bool instant = false);
void _hideCategorySettings(bool instant = false);
void _hideSource(bool instant = false);
void _hideGame(bool instant = false);
void _hideGameInfo(bool instant = false);
void _hideNandEmu(bool instant = false);
void _hideNandEmuPg();
void _hideHome(bool instant = false);
void _hideExitTo(bool instant = false);
void _hideShutdown(bool instant = false);
void _hideCoverBanner(bool instant = false);
void _hideExplorer(bool instant = false);
void _hideWad(bool instant = false);
void _hidePaths(bool instant = false);
void _hideCheckboxesMenu(bool instant = false);
void _hideSM_Editor(bool instant = false);
//
void _showError(void);
void _showMain(void);

View File

@ -3,39 +3,19 @@
s16 m_coverbnrLblTitle;
s16 m_coverbnrBtnBack;
s16 m_coverbnrLblDlCover;
s16 m_coverbnrBtnDlCover;
s16 m_coverbnrLblDeleteCover;
s16 m_coverbnrBtnDeleteCover;
s16 m_coverbnrLblDlBanner;
s16 m_coverbnrBtnDlBanner;
s16 m_coverbnrLblDeleteBanner;
s16 m_coverbnrBtnDeleteBanner;
s16 m_coverbnrLblUser[4];
TexData m_coverbnrBg;
void CMenu::_hideCoverBanner(bool instant)
{
m_btnMgr.hide(m_coverbnrLblTitle, instant);
m_btnMgr.hide(m_coverbnrBtnBack, instant);
m_btnMgr.hide(m_coverbnrLblDlCover, instant);
m_btnMgr.hide(m_coverbnrLblDeleteCover, instant);
m_btnMgr.hide(m_coverbnrLblDlBanner, instant);
m_btnMgr.hide(m_coverbnrLblDeleteBanner, instant);
m_btnMgr.hide(m_coverbnrBtnDlCover, instant);
m_btnMgr.hide(m_coverbnrBtnDeleteCover, instant);
m_btnMgr.hide(m_coverbnrBtnDlBanner, instant);
m_btnMgr.hide(m_coverbnrBtnDeleteBanner, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_coverbnrLblUser); ++i)
if(m_coverbnrLblUser[i] != -1)
m_btnMgr.hide(m_coverbnrLblUser[i], instant);
_hideConfigButtons(instant);
}
void CMenu::_showCoverBanner(void)
@ -43,20 +23,29 @@ void CMenu::_showCoverBanner(void)
_setBg(m_coverbnrBg, m_coverbnrBg);
m_btnMgr.show(m_coverbnrLblTitle);
m_btnMgr.show(m_coverbnrBtnBack);
m_btnMgr.show(m_coverbnrLblDlCover);
m_btnMgr.show(m_coverbnrLblDeleteCover);
m_btnMgr.show(m_coverbnrLblDlBanner);
m_btnMgr.show(m_coverbnrLblDeleteBanner);
m_btnMgr.show(m_coverbnrBtnDlCover);
m_btnMgr.show(m_coverbnrBtnDeleteCover);
m_btnMgr.show(m_coverbnrBtnDlBanner);
m_btnMgr.show(m_coverbnrBtnDeleteBanner);
for(u8 i = 0; i < ARRAY_SIZE(m_coverbnrLblUser); ++i)
if(m_coverbnrLblUser[i] != -1)
m_btnMgr.show(m_coverbnrLblUser[i]);
m_btnMgr.setText(m_configLbl1, _t("cfgbnr1", L"Download Cover"));
m_btnMgr.setText(m_configLbl2, _t("cfgbnr2", L"Delete Cover"));
m_btnMgr.setText(m_configLbl3, _t("cfgbnr3", L"Download Custom Banner"));
m_btnMgr.setText(m_configLbl4, _t("cfgbnr4", L"Delete Banner"));
m_btnMgr.setText(m_configBtn1, _t("cfgbnr5", L"Download"));
m_btnMgr.setText(m_configBtn2, _t("cfgbnr6", L"Delete"));
m_btnMgr.setText(m_configBtn3, _t("cfgbnr5", L"Download"));
m_btnMgr.setText(m_configBtn4, _t("cfgbnr6", L"Delete"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configBtn1);
m_btnMgr.show(m_configBtn2);
m_btnMgr.show(m_configBtn3);
m_btnMgr.show(m_configBtn4);
}
void CMenu::_CoverBanner(void)
@ -67,28 +56,28 @@ void CMenu::_CoverBanner(void)
while(!m_exit)
{
_mainLoopCommon();
if (BTN_HOME_PRESSED || BTN_B_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_coverbnrBtnBack)))
if(BTN_HOME_PRESSED || BTN_B_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_coverbnrBtnBack)))
break;
else if (BTN_UP_PRESSED)
else if(BTN_UP_PRESSED)
m_btnMgr.up();
else if (BTN_DOWN_PRESSED)
else if(BTN_DOWN_PRESSED)
m_btnMgr.down();
else if(BTN_A_PRESSED)
{
if(m_btnMgr.selected(m_coverbnrBtnDlCover))
if(m_btnMgr.selected(m_configBtn1))
{
_hideCoverBanner();
_download(id, 1);
_showCoverBanner();
}
else if(m_btnMgr.selected(m_coverbnrBtnDeleteCover))
else if(m_btnMgr.selected(m_configBtn2))
{
_hideCoverBanner();
RemoveCover(id);
error(_t("deltcover", L"Cover is deleted."));
_showCoverBanner();
}
else if(m_btnMgr.selected(m_coverbnrBtnDlBanner))
else if(m_btnMgr.selected(m_configBtn3))
{
_hideCoverBanner();
fsop_deleteFile(fmt("%s/%s.bnr", m_bnrCacheDir.c_str(), id));
@ -99,7 +88,7 @@ void CMenu::_CoverBanner(void)
m_newGame = true;
_showCoverBanner();
}
else if(m_btnMgr.selected(m_coverbnrBtnDeleteBanner))
else if(m_btnMgr.selected(m_configBtn4))
{
_hideCoverBanner();
fsop_deleteFile(fmt("%s/%s.bnr", m_bnrCacheDir.c_str(), id));
@ -118,29 +107,14 @@ void CMenu::_CoverBanner(void)
void CMenu::_initCoverBanner()
{
m_coverbnrBg = _texture("COVERBNR/BG", "texture", theme.bg, false);
_addUserLabels(m_coverbnrLblUser, ARRAY_SIZE(m_coverbnrLblUser), "COVERBNR");
m_coverbnrLblTitle = _addLabel("COVERBNR/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
m_coverbnrBtnBack = _addButton("COVERBNR/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
m_coverbnrLblDlCover = _addLabel("COVERBNR/DLCOVER", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_coverbnrBtnDlCover = _addButton("COVERBNR/DLCOVER_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
m_coverbnrLblDeleteCover = _addLabel("COVERBNR/DELCOVER", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_coverbnrBtnDeleteCover = _addButton("COVERBNR/DELCOVER_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
m_coverbnrLblDlBanner = _addLabel("COVERBNR/DLBNR", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_coverbnrBtnDlBanner = _addButton("COVERBNR/DLBNR_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
m_coverbnrLblDeleteBanner = _addLabel("COVERBNR/DELBNR", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_coverbnrBtnDeleteBanner = _addButton("COVERBNR/DELBNR_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
_setHideAnim(m_coverbnrLblTitle, "COVERBNR/TITLE", 0, 0, -2.f, 0.f);
_setHideAnim(m_coverbnrBtnBack, "COVERBNR/BACK_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_coverbnrLblDlCover, "COVERBNR/DLCOVER", 50, 0, -2.f, 0.f);
_setHideAnim(m_coverbnrBtnDlCover, "COVERBNR/DLCOVER_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_coverbnrLblDeleteCover, "COVERBNR/DELCOVER", 50, 0, -2.f, 0.f);
_setHideAnim(m_coverbnrBtnDeleteCover, "COVERBNR/DELCOVER_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_coverbnrLblDlBanner, "COVERBNR/DLBNR", 50, 0, -2.f, 0.f);
_setHideAnim(m_coverbnrBtnDlBanner, "COVERBNR/DLBNR_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_coverbnrLblDeleteBanner, "COVERBNR/DELBNR", 50, 0, -2.f, 0.f);
_setHideAnim(m_coverbnrBtnDeleteBanner, "COVERBNR/DELBNR_BTN", -50, 0, 1.f, 0.f);
_hideCoverBanner(true);
_textCoverBanner();
}
@ -148,14 +122,5 @@ void CMenu::_initCoverBanner()
void CMenu::_textCoverBanner(void)
{
m_btnMgr.setText(m_coverbnrLblTitle, _t("cfgg40", L"Manage Cover and Banner"));
m_btnMgr.setText(m_coverbnrLblDlCover, _t("cfgbnr1", L"Download Cover"));
m_btnMgr.setText(m_coverbnrLblDeleteCover, _t("cfgbnr2", L"Delete Cover"));
m_btnMgr.setText(m_coverbnrLblDlBanner, _t("cfgbnr3", L"Download Custom Banner"));
m_btnMgr.setText(m_coverbnrLblDeleteBanner, _t("cfgbnr4", L"Delete Banner"));
m_btnMgr.setText(m_coverbnrBtnDlCover, _t("cfgbnr5", L"Download"));
m_btnMgr.setText(m_coverbnrBtnDeleteCover, _t("cfgbnr6", L"Delete"));
m_btnMgr.setText(m_coverbnrBtnDlBanner, _t("cfgbnr5", L"Download"));
m_btnMgr.setText(m_coverbnrBtnDeleteBanner, _t("cfgbnr6", L"Delete"));
m_btnMgr.setText(m_coverbnrBtnBack, _t("cfg10", L"Back"));
}

View File

@ -556,7 +556,8 @@ void CMenu::_configMain(void)
}
else
m_cfg.setString("GENERAL", "language", m_curLanguage.c_str());
m_btnMgr.setText(m_configLbl2Val, m_curLanguage);
_updateText();
_showConfigMain(2);
}
else if(m_btnMgr.selected(m_configBtn3))
{

View File

@ -27,14 +27,20 @@ void CMenu::_showConfigSrc(bool m_sourceflow)
if(m_cfgsrcLblUser[i] != -1)
m_btnMgr.show(m_cfgsrcLblUser[i]);
m_btnMgr.setText(m_configLbl1, _t("cfgsm3", L"Enable Sourceflow"));
m_btnMgr.setText(m_configBtn1, m_cfg.getBool(SOURCEFLOW_DOMAIN, "enabled") ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configBtn1);
if(m_sourceflow)
{
m_btnMgr.setText(m_configLbl2, _t("cfgsm4", L"Sourceflow Smallbox"));
m_btnMgr.setText(m_configLbl3, _t("cfghb4", L"Box Mode"));
m_btnMgr.setText(m_configLbl4, _t("cfgc4", L"Adjust Coverflow"));
m_btnMgr.setText(m_configBtn2, m_cfg.getBool(SOURCEFLOW_DOMAIN, "smallbox") ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.setText(m_configBtn3, m_cfg.getBool(SOURCEFLOW_DOMAIN, "box_mode") ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.setText(m_configBtn4, _t("cfgc5", L"Go"));
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configBtn2);
@ -135,10 +141,5 @@ void CMenu::_initConfigSrc(void)
void CMenu::_textConfigSrc(void)
{
m_btnMgr.setText(m_cfgsrcLblTitle, _t("cfgsm1", L"Sourceflow Settings"));
m_btnMgr.setText(m_configLbl1, _t("cfgsm3", L"Enable Sourceflow"));
m_btnMgr.setText(m_configLbl2, _t("cfgsm4", L"Sourceflow Smallbox"));
m_btnMgr.setText(m_configLbl3, _t("cfghb4", L"Box Mode"));
m_btnMgr.setText(m_configLbl4, _t("cfgc4", L"Adjust Coverflow"));
m_btnMgr.setText(m_configBtn4, _t("cfgc5", L"Go"));
m_btnMgr.setText(m_cfgsrcBtnBack, _t("cfg10", L"Back"));
}