- added source menu ini option to set flow layout number. under [general] add flow=#. this also applies to tiers.

- added clearing source tiers and tier current button numbers whenever a new theme is chosen.
This commit is contained in:
Fledge68 2019-11-03 17:49:19 -06:00
parent e29894d629
commit b2635620ce
3 changed files with 16 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View File

@ -450,6 +450,8 @@ int CMenu::main(void)
{ {
/* new theme - exit wiiflow and reload */ /* new theme - exit wiiflow and reload */
fsop_deleteFolder(fmt("%s/sourceflow", m_cacheDir.c_str())); fsop_deleteFolder(fmt("%s/sourceflow", m_cacheDir.c_str()));
m_cfg.remove(SOURCEFLOW_DOMAIN, "numbers");
m_cfg.remove(SOURCEFLOW_DOMAIN, "tiers");
m_reload = true; m_reload = true;
break; break;
} }
@ -501,6 +503,8 @@ int CMenu::main(void)
{ {
// new theme - exit wiiflow and reload // new theme - exit wiiflow and reload
fsop_deleteFolder(fmt("%s/sourceflow", m_cacheDir.c_str())); fsop_deleteFolder(fmt("%s/sourceflow", m_cacheDir.c_str()));
m_cfg.remove(SOURCEFLOW_DOMAIN, "numbers");
m_cfg.remove(SOURCEFLOW_DOMAIN, "tiers");
m_reload = true; m_reload = true;
break; break;
} }

View File

@ -110,7 +110,10 @@ void CMenu::_sourceFlow()
m_source.load(fmt("%s/%s", m_sourceDir.c_str(), fn.c_str())); m_source.load(fmt("%s/%s", m_sourceDir.c_str(), fn.c_str()));
SF_cacheCovers = true; SF_cacheCovers = true;
fn.replace(fn.find("."), 4, "_flow"); fn.replace(fn.find("."), 4, "_flow");
curflow = m_cfg.getInt(SOURCEFLOW_DOMAIN, fn, m_cfg.getInt(SOURCEFLOW_DOMAIN, "last_cf_mode", 1)); if(m_source.has("general", "flow"))
curflow = m_source.getInt("general", "flow", 1);
else
curflow = m_cfg.getInt(SOURCEFLOW_DOMAIN, fn, m_cfg.getInt(SOURCEFLOW_DOMAIN, "last_cf_mode", 1));
/* get max source button # */ /* get max source button # */
m_max_source_btn = 0; m_max_source_btn = 0;
const char *srcDomain = m_source.firstDomain().c_str(); const char *srcDomain = m_source.firstDomain().c_str();
@ -180,7 +183,10 @@ bool CMenu::_srcTierBack(bool home)
m_source.unload(); m_source.unload();
m_source.load(fmt("%s/%s", m_sourceDir.c_str(), fn.c_str())); m_source.load(fmt("%s/%s", m_sourceDir.c_str(), fn.c_str()));
fn.replace(fn.find("."), 4, "_flow"); fn.replace(fn.find("."), 4, "_flow");
curflow = m_cfg.getInt(SOURCEFLOW_DOMAIN, fn, m_cfg.getInt(SOURCEFLOW_DOMAIN, "last_cf_mode", 1)); if(m_source.has("general", "flow"))
curflow = m_source.getInt("general", "flow", 1);
else
curflow = m_cfg.getInt(SOURCEFLOW_DOMAIN, fn, m_cfg.getInt(SOURCEFLOW_DOMAIN, "last_cf_mode", 1));
/* get max source button # */ /* get max source button # */
m_max_source_btn = 0; m_max_source_btn = 0;
const char *srcDomain = m_source.firstDomain().c_str(); const char *srcDomain = m_source.firstDomain().c_str();
@ -584,7 +590,10 @@ void CMenu::_initSourceMenu()
m_source.load(fmt("%s/%s", m_sourceDir.c_str(), fn.c_str())); m_source.load(fmt("%s/%s", m_sourceDir.c_str(), fn.c_str()));
fn.replace(fn.find("."), 4, "_flow"); fn.replace(fn.find("."), 4, "_flow");
curflow = m_cfg.getInt(SOURCEFLOW_DOMAIN, fn, m_cfg.getInt(SOURCEFLOW_DOMAIN, "last_cf_mode", 1)); if(m_source.has("general", "flow"))
curflow = m_source.getInt("general", "flow", 1);
else
curflow = m_cfg.getInt(SOURCEFLOW_DOMAIN, fn, m_cfg.getInt(SOURCEFLOW_DOMAIN, "last_cf_mode", 1));
/* get max source button # */ /* get max source button # */
m_max_source_btn = 0; m_max_source_btn = 0;