- Added ability to modify emuflow and brewflow under 'Adjust Coverflow' using Mugoto's code.

- Have disabled '1' & '2' mode switching while in emu mode and homebrew mode so emuflow and brewflow have only one mode and coverflow has 15 still. 
I'll leave it up to Fix94 how many modes he wants each view to have. Fix94 you may want to tweak and fine tune this - it's just a temp solution for now.
This commit is contained in:
fledge68 2012-04-15 13:47:42 +00:00
parent 37b6ebbc26
commit 565ffb0b86
3 changed files with 22 additions and 10 deletions

View File

@ -918,6 +918,7 @@ private:
void _loadDefaultFont(bool korean);
void _cleanupDefaultFont();
const char *_domainFromView(void);
const char *_cfDomain(bool selected = false);
void UpdateCache(u32 view = COVERFLOW_MAX);
bool MIOSisDML();
void RemoveCover( char * id );

View File

@ -175,8 +175,8 @@ void CMenu::_showCFTheme(u32 curParam, int version, bool wide)
{
const CMenu::SCFParamDesc &p = CMenu::_cfParams[curParam];
bool selected = m_cf.selected();
string domUnsel(sfmt("_COVERFLOW_%i", version).c_str());
string domSel(sfmt("_COVERFLOW_%i_S", version).c_str());
string domUnsel(sfmt(_cfDomain(), version));
string domSel(sfmt(_cfDomain(true), version));
m_cf.simulateOtherScreenFormat(p.scrnFmt && wide != m_vid.wide());
_setBg(m_mainBg, m_mainBgLQ);
@ -201,8 +201,7 @@ void CMenu::_showCFTheme(u32 curParam, int version, bool wide)
//
for (int i = 0; i < 4; ++i)
{
string domain = (p.domain != CMenu::SCFParamDesc::PDD_NORMAL && selected) || p.domain == CMenu::SCFParamDesc::PDD_SELECTED
? domSel : domUnsel;
string domain = (p.domain != CMenu::SCFParamDesc::PDD_NORMAL && selected) || p.domain == CMenu::SCFParamDesc::PDD_SELECTED ? domSel : domUnsel;
int k = i * 4;
string key(p.key[i]);
if (!wide && p.scrnFmt && (p.paramType[i] == CMenu::SCFParamDesc::PDT_V3D || p.paramType[i] == CMenu::SCFParamDesc::PDT_FLOAT || p.paramType[i] == CMenu::SCFParamDesc::PDT_INT))
@ -344,8 +343,8 @@ void CMenu::_cfTheme(void)
}
else if (copyVersion > 0 && BTN_B_HELD && BTN_2_PRESSED)
{
string domSrc(sfmt(copySelected ? "_COVERFLOW_%i_S" : "_COVERFLOW_%i", copyVersion));
string domDst(sfmt(m_cf.selected() ? "_COVERFLOW_%i_S" : "_COVERFLOW_%i", cfVersion));
string domSrc(sfmt(_cfDomain(copySelected), copyVersion));
string domDst(sfmt(_cfDomain(m_cf.selected()), cfVersion));
if (copyVersion != cfVersion || copySelected != m_cf.selected())
m_theme.copyDomain(domDst, domSrc);
else if (copyWide != wide)
@ -413,7 +412,7 @@ void CMenu::_cfTheme(void)
m_theme.load(sfmt("%s/%s.ini", m_themeDir.c_str(), m_cfg.getString("GENERAL", "theme", "defaut").c_str()).c_str());
break;
}
else if (m_btnMgr.selected(m_cfThemeBtnAlt))
else if (m_btnMgr.selected(m_cfThemeBtnAlt) && m_current_view != COVERFLOW_HOMEBREW && m_current_view != COVERFLOW_EMU)
{
cfVersion = 1 + loopNum(cfVersion, m_numCFVersions);
_showCFTheme(curParam, cfVersion, wide);
@ -474,8 +473,7 @@ void CMenu::_cfParam(bool inc, int i, const CMenu::SCFParamDesc &p, int cfVersio
{
int k = i / 4;
string key(p.key[k]);
const char *d = (p.domain != CMenu::SCFParamDesc::PDD_NORMAL && m_cf.selected()) || p.domain == CMenu::SCFParamDesc::PDD_SELECTED
? "_COVERFLOW_%i_S" : "_COVERFLOW_%i";
const char *d = _cfDomain((p.domain != CMenu::SCFParamDesc::PDD_NORMAL && m_cf.selected()) || p.domain == CMenu::SCFParamDesc::PDD_SELECTED);
string domain(sfmt(d, cfVersion));
float step = p.step[k];
if (!wide && p.scrnFmt && (p.paramType[k] == CMenu::SCFParamDesc::PDT_V3D || p.paramType[k] == CMenu::SCFParamDesc::PDT_FLOAT || p.paramType[k] == CMenu::SCFParamDesc::PDT_INT))
@ -552,6 +550,19 @@ void CMenu::_cfParam(bool inc, int i, const CMenu::SCFParamDesc &p, int cfVersio
}
}
const char *CMenu::_cfDomain(bool selected)
{
switch(m_current_view)
{
case COVERFLOW_EMU:
return selected ? "_EMUFLOW_%i_S" : "_EMUFLOW_%i";
case COVERFLOW_HOMEBREW:
return selected ? "_BREWFLOW_%i_S" : "_BREWFLOW_%i";
default:
return selected ? "_COVERFLOW_%i_S" : "_COVERFLOW_%i";
}
}
void CMenu::_initCFThemeMenu(CMenu::SThemeData &theme)
{
STexture emptyTex;

View File

@ -311,7 +311,7 @@ int CMenu::main(void)
}
m_btnMgr.noClick(false);
//CF Layout select
if (!BTN_B_HELD && (BTN_1_PRESSED || BTN_2_PRESSED))
if (!BTN_B_HELD && (BTN_1_PRESSED || BTN_2_PRESSED) && m_current_view != COVERFLOW_HOMEBREW && m_current_view != COVERFLOW_EMU)
{
m_btnMgr.noClick(true);
if (!m_btnMgr.selected(m_mainBtnQuit))