- sourceflow cover folders can only be in wiiflow/source_menu folder. I don't expect themers to take the time to make their themed covers

- removed B on mode to source from source config menu, if B to source menu is disabled B on mode to source is automatically enabled and vice versa.
This commit is contained in:
fledge68 2013-09-13 15:38:23 +00:00
parent e873a8728b
commit 4f142942e0
4 changed files with 52 additions and 61 deletions

View File

@ -2688,12 +2688,11 @@ const char *CMenu::getBoxPath(const dir_discHdr *element)
return fmt("%s/%s.png", m_boxPicDir.c_str(), strrchr(element->path, '/') + 1);
else if(element->type == TYPE_SOURCE)
{
if(m_cfg.getBool("SOURCEFLOW", "smallbox"))
const char *m_sflowDir = m_cfg.getString("GENERAL", "dir_Source", fmt("%s/source_menu", m_dataDir.c_str())).c_str();
const char *coverImg = strrchr(element->path, '/') + 1;
if(coverImg == NULL || m_cfg.getBool("SOURCEFLOW", "smallbox"))
return NULL;
const char *tempname = element->path;
if(strchr(element->path, '/') != NULL)
tempname = strrchr(element->path, '/') + 1;
return fmt("%s/full_covers/%s", m_sourceDir.c_str(), tempname);
return fmt("%s/full_covers/%s", m_sflowDir, coverImg);
}
return fmt("%s/%s.png", m_boxPicDir.c_str(), element->id);
}
@ -2715,20 +2714,18 @@ const char *CMenu::getFrontPath(const dir_discHdr *element)
return fmt("%s/icon.png", element->path);
else if(element->type == TYPE_SOURCE)
{
const char *temppath = NULL;
const char *tempname = element->path;
if(strchr(element->path, '/') != NULL)
tempname = strrchr(element->path, '/') + 1;
if(!m_cfg.getBool("SOURCEFLOW", "smallbox"))
const char *m_sflowDir = m_cfg.getString("GENERAL", "dir_Source", fmt("%s/source_menu", m_dataDir.c_str())).c_str();
const char *coverImg = strrchr(element->path, '/') + 1;
if(coverImg == NULL)
return NULL;
const char *coverPath = fmt("%s/front_covers/%s", m_sflowDir, coverImg);
if(m_cfg.getBool("SOURCEFLOW", "smallbox") || !fsop_FileExist(coverPath))
{
temppath = fmt("%s/front_covers/%s", m_sourceDir.c_str(), tempname);
if(fsop_FileExist(temppath))
return temppath;
coverPath = fmt("%s/front_covers/%s", m_sflowDir, coverImg);
if(!fsop_FileExist(coverPath))
return element->path;
}
temppath = fmt("%s/small_covers/%s", m_sourceDir.c_str(), tempname);
if(fsop_FileExist(temppath))
return temppath;
return fmt("%s", element->path);
return coverPath;
}
return fmt("%s/%s.png", m_picDir.c_str(), element->id);
}

View File

@ -41,9 +41,6 @@ s16 m_cfgsrcBtnClearSF;
s16 m_cfgsrcLblMultisource;
s16 m_cfgsrcBtnMultisource;
s16 m_cfgsrcLblBonMode;
s16 m_cfgsrcBtnBonMode;
u8 cfgsrc_curPage = 1;
u8 cfgsrc_Pages = 2;
@ -89,9 +86,6 @@ static void hideCfgSrc(bool instant, bool common)
m_btnMgr.hide(m_cfgsrcLblMultisource, instant);
m_btnMgr.hide(m_cfgsrcBtnMultisource, instant);
m_btnMgr.hide(m_cfgsrcLblBonMode, instant);
m_btnMgr.hide(m_cfgsrcBtnBonMode, instant);
}
void CMenu::_CfgSrc(void)
@ -134,6 +128,7 @@ void CMenu::_CfgSrc(void)
{
m_cfg.setBool("GENERAL", "use_source", !m_cfg.getBool("GENERAL", "use_source", false));
m_btnMgr.setText(m_cfgsrcBtnEnableSM, m_cfg.getBool("GENERAL", "use_source", false) ? _t("on", L"On") : _t("off", L"Off"));
m_use_source = m_cfg.getBool("GENERAL", "use_source", false);
}
else if (m_btnMgr.selected(m_cfgsrcBtnSourceOnBoot))
{
@ -161,11 +156,6 @@ void CMenu::_CfgSrc(void)
m_btnMgr.setText(m_cfgsrcBtnMultisource, m_cfg.getBool("GENERAL", "multisource") ? _t("on", L"On") : _t("off", L"Off"));
m_multisource = m_cfg.getBool("GENERAL", "multisource", false);
}
else if (m_btnMgr.selected(m_cfgsrcBtnBonMode))
{
m_cfg.setBool("GENERAL", "b_on_mode_to_source", !m_cfg.getBool("GENERAL", "b_on_mode_to_source", false));
m_btnMgr.setText(m_cfgsrcBtnBonMode, m_cfg.getBool("GENERAL", "b_on_mode_to_source") ? _t("on", L"On") : _t("off", L"Off"));
}
}
}
hideCfgSrc(false, true);
@ -197,30 +187,25 @@ void CMenu::_refreshCfgSrc()
else
{
m_btnMgr.setText(m_cfgsrcBtnMultisource, m_cfg.getBool("GENERAL", "multisource") ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.setText(m_cfgsrcBtnBonMode, m_cfg.getBool("GENERAL", "b_on_mode_to_source") ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.show(m_cfgsrcLblClearSF);
m_btnMgr.show(m_cfgsrcBtnClearSF);
m_btnMgr.show(m_cfgsrcLblMultisource);
m_btnMgr.show(m_cfgsrcBtnMultisource);
m_btnMgr.show(m_cfgsrcLblBonMode);
m_btnMgr.show(m_cfgsrcBtnBonMode);
}
}
void CMenu::_textCfgSrc(void)
{
m_btnMgr.setText(m_cfgsrcLblTitle, _t("cfgsm1", L"Source Menu Settings"));
m_btnMgr.setText(m_cfgsrcLblEnableSM, _t("cfgsm2", L"Enable Source Menu"));
m_btnMgr.setText(m_cfgsrcLblEnableSM, _t("cfgsm2", L"Enable B To Source Menu"));
m_btnMgr.setText(m_cfgsrcLblSourceOnBoot, _t("cfgbt5", L"Show source menu on boot"));
m_btnMgr.setText(m_cfgsrcLblEnableSF, _t("cfgsm3", L"Enable Sourceflow"));
m_btnMgr.setText(m_cfgsrcLblSmallbox, _t("cfgsm4", L"Sourceflow Smallbox"));
m_btnMgr.setText(m_cfgsrcLblClearSF, _t("cfgsm5", L"Clear Sourceflow Cache"));
m_btnMgr.setText(m_cfgsrcBtnClearSF, _t("cfgc5", L"Go"));
m_btnMgr.setText(m_cfgsrcLblMultisource, _t("cfgbt6", L"Enable Multisource Features"));
m_btnMgr.setText(m_cfgsrcLblBonMode, _t("cfgsm6", L"B On Mode To Source"));
m_btnMgr.setText(m_cfgsrcBtnBack, _t("cfg10", L"Back"));
}
@ -252,9 +237,6 @@ void CMenu::_initCfgSrc(void)
m_cfgsrcLblMultisource = _addLabel("CFG_SRC/MULTISOURCE", theme.lblFont, L"", 40, 190, 340, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_cfgsrcBtnMultisource = _addButton("CFG_SRC/MULTISOURCE_BTN", theme.btnFont, L"", 370, 190, 230, 56, theme.btnFontColor);
m_cfgsrcLblBonMode = _addLabel("CFG_SRC/B_ON_MODE", theme.lblFont, L"", 40, 250, 340, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_cfgsrcBtnBonMode = _addButton("CFG_SRC/B_ON_MODE_BTN", theme.btnFont, L"", 370, 250, 230, 56, theme.btnFontColor);
_setHideAnim(m_cfgsrcLblTitle, "CFG_SRC/TITLE", 0, -200, 0.f, 1.f);
_setHideAnim(m_cfgsrcBtnBack, "CFG_SRC/BACK_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_cfgsrcLblPage, "CFG_SRC/PAGE_BTN", 0, 0, 1.f, -1.f);
@ -279,9 +261,6 @@ void CMenu::_initCfgSrc(void)
_setHideAnim(m_cfgsrcLblMultisource, "CFG_SRC/MULTISOURCE", -200, 0, 1.f, 0.f);
_setHideAnim(m_cfgsrcBtnMultisource, "CFG_SRC/MULTISOURCE_BTN", 200, 0, 1.f, 0.f);
_setHideAnim(m_cfgsrcLblBonMode, "CFG_SRC/B_ON_MODE", -200, 0, 1.f, 0.f);
_setHideAnim(m_cfgsrcBtnBonMode, "CFG_SRC/B_ON_MODE_BTN", 200, 0, 1.f, 0.f);
hideCfgSrc(true, true);
_textCfgSrc();
}

View File

@ -301,7 +301,7 @@ int CMenu::main(void)
WDVD_GetCoverStatus(&disc_check);
/* Main Loop */
_mainLoopCommon(true);
if(m_use_source && bheld && !BTN_B_HELD)
if(bheld && !BTN_B_HELD)
{
bheld = false;
if(bUsed)
@ -314,25 +314,28 @@ int CMenu::main(void)
LoadView();
continue;
}
_hideMain();
if(m_cfg.getBool("SOURCEFLOW", "enabled", false))
if(m_use_source)
{
m_sourceflow = true;
LoadView();
}
else
{
if(!_Source()) //Different source selected
_hideMain();
if(m_cfg.getBool("SOURCEFLOW", "enabled", false))
{
m_sourceflow = true;
LoadView();
}
else
{
if(BTN_B_HELD)
bUsed = true;
_initCF();
_showMain();
if(!_Source()) //Different source selected
LoadView();
else
{
if(BTN_B_HELD)
bUsed = true;
_initCF();
_showMain();
}
}
continue;
}
continue;
}
}
if(dpad_mode && (BTN_UP_PRESSED || BTN_DOWN_PRESSED || BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED) && (m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew) || m_btnMgr.selected(m_mainBtnEmu)))
@ -543,17 +546,29 @@ int CMenu::main(void)
//Events to Switch off/on nand emu
else if(m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML)|| m_btnMgr.selected(m_mainBtnEmu) || m_btnMgr.selected(m_mainBtnHomebrew))
{
if(m_cfg.getBool("GENERAL", "b_on_mode_to_source", true))
if(!m_use_source)//B on mode to source
{
_hideMain();
if(!_Source()) //Different source selected
if(m_cfg.getBool("SOURCEFLOW", "enabled", false))
{
m_sourceflow = true;
LoadView();
}
else
_showMain();
if(BTN_B_HELD)
bUsed = true;
{
if(!_Source()) //Different source selected
LoadView();
else
{
if(BTN_B_HELD)
bUsed = true;
_initCF();
_showMain();
}
}
continue;
}
}
else if(m_btnMgr.selected(m_mainBtnNext) || m_btnMgr.selected(m_mainBtnPrev))
{

View File

@ -164,7 +164,7 @@ cfgs2=GUI sound volume
cfgs3=Coverflow sound volume
cfgs4=Game sound volume
cfgsm1=Source Menu Settings
cfgsm2=Enable Source Menu
cfgsm2=Enable B To Source Menu
cfgsm3=Enable Sourceflow
cfgsm4=Sourceflow Smallbox
cfgsm5=Clear Sourceflow Cache