- changed gamecube settings menu to use main settings buttons.

- fixed reload cache when both channel types is chosen.
- minor fixes to source menu code.
This commit is contained in:
Fledge68 2022-06-14 17:54:29 -05:00
parent c5f993ef18
commit 5df5ccc2ee
6 changed files with 101 additions and 206 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

View File

@ -2459,16 +2459,16 @@ bool CMenu::_loadChannelList(void)
m_cfg.setUInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
chantypes = CHANNELS_REAL;
}
bool updateCache = m_cfg.getBool(CHANNEL_DOMAIN, "update_cache");
m_cfg.remove(CHANNEL_DOMAIN, "update_cache");
vector<string> NullVector;
if(chantypes & CHANNELS_REAL)
{
gprintf("Adding real nand list\n");
NANDemuView = false;
bool updateCache = m_cfg.getBool(CHANNEL_DOMAIN, "update_cache");
if(updateCache)
cacheCovers = true;// real nand channels list is not cached but covers may still need to be updated
m_cacheList.CreateList(COVERFLOW_CHANNEL, std::string(), NullVector, std::string(), false);
m_cfg.remove(CHANNEL_DOMAIN, "update_cache");
for(vector<dir_discHdr>::iterator tmp_itr = m_cacheList.begin(); tmp_itr != m_cacheList.end(); tmp_itr++)
m_gameList.push_back(*tmp_itr);
}
@ -2481,10 +2481,8 @@ bool CMenu::_loadChannelList(void)
gprintf("Adding emu nand list\n");
currentPartition = emuPartition;
string cacheDir = fmt("%s/%s_channels.db", m_listCacheDir.c_str(), DeviceName[currentPartition]);
bool updateCache = m_cfg.getBool(CHANNEL_DOMAIN, "update_cache");
bool preCachedList = fsop_FileExist(cacheDir.c_str());
m_cacheList.CreateList(COVERFLOW_CHANNEL, std::string(), NullVector, cacheDir, updateCache);
m_cfg.remove(CHANNEL_DOMAIN, "update_cache");
for(vector<dir_discHdr>::iterator tmp_itr = m_cacheList.begin(); tmp_itr != m_cacheList.end(); tmp_itr++)
m_gameList.push_back(*tmp_itr);
if(updateCache || (!preCachedList && fsop_FileExist(cacheDir.c_str())))

View File

@ -927,6 +927,7 @@ private:
void _hideError(bool instant = false);
void _hideMain(bool instant = false);
void _hideConfigMain(bool instant = false);
void _hideConfigButtons(bool instant = false);
void _hideConfigGC(bool instant = false);
void _hideConfigGCPage(bool instant = false);
void _hidePartitionsCfg(bool instant = false);

View File

@ -11,34 +11,6 @@ s16 m_configGCLblPage;
s16 m_configGCBtnPageM;
s16 m_configGCBtnPageP;
//pg 1
s16 m_configGCLblGCGameLanguage;
s16 m_configGCLblGCLanguage;
s16 m_configGCBtnGCLanguageP;
s16 m_configGCBtnGCLanguageM;
s16 m_configGCLblGCGameVideo;
s16 m_configGCLblGCVideo;
s16 m_configGCBtnGCVideoP;
s16 m_configGCBtnGCVideoM;
s16 m_configGCLblGCGameLoader;
s16 m_configGCLblGCLoader;
s16 m_configGCBtnGCLoaderP;
s16 m_configGCBtnGCLoaderM;
s16 m_configGCLblDevMemCard;
s16 m_configGCBtnDevMemCard;
//pg 2
s16 m_configGCLblNinMemCard;
s16 m_configGCLblNinMemCardVal;
s16 m_configGCBtnNinMemCardP;
s16 m_configGCBtnNinMemCardM;
s16 m_configGCLblNinWiiUWide;
s16 m_configGCBtnNinWiiUWide;
static int curPage;
template <class T> static inline T loopNum(T i, T s)
@ -56,38 +28,7 @@ void CMenu::_hideConfigGC(bool instant)
for(u8 i = 0; i < ARRAY_SIZE(m_configGCLblUser); ++i)
if(m_configGCLblUser[i] != -1)
m_btnMgr.hide(m_configGCLblUser[i], instant);
_hideConfigGCPage(instant);
}
void CMenu::_hideConfigGCPage(bool instant)
{
//pg 1
m_btnMgr.hide(m_configGCLblGCGameLanguage, instant);
m_btnMgr.hide(m_configGCLblGCLanguage, instant);
m_btnMgr.hide(m_configGCBtnGCLanguageP, instant);
m_btnMgr.hide(m_configGCBtnGCLanguageM, instant);
m_btnMgr.hide(m_configGCLblGCGameVideo, instant);
m_btnMgr.hide(m_configGCLblGCVideo, instant);
m_btnMgr.hide(m_configGCBtnGCVideoP, instant);
m_btnMgr.hide(m_configGCBtnGCVideoM, instant);
m_btnMgr.hide(m_configGCLblGCGameLoader, instant);
m_btnMgr.hide(m_configGCLblGCLoader, instant);
m_btnMgr.hide(m_configGCBtnGCLoaderP, instant);
m_btnMgr.hide(m_configGCBtnGCLoaderM, instant);
m_btnMgr.hide(m_configGCLblDevMemCard, instant);
m_btnMgr.hide(m_configGCBtnDevMemCard, instant);
//pg 2
m_btnMgr.hide(m_configGCLblNinMemCard, instant);
m_btnMgr.hide(m_configGCLblNinMemCardVal, instant);
m_btnMgr.hide(m_configGCBtnNinMemCardP, instant);
m_btnMgr.hide(m_configGCBtnNinMemCardM, instant);
m_btnMgr.hide(m_configGCLblNinWiiUWide, instant);
m_btnMgr.hide(m_configGCBtnNinWiiUWide, instant);
_hideConfigButtons(instant);
}
void CMenu::_showConfigGC(void)
@ -106,56 +47,60 @@ void CMenu::_showConfigGC(void)
void CMenu::_showConfigGCPage(void)
{
_hideConfigGCPage();
_hideConfigButtons(true);
m_btnMgr.setText(m_configGCLblPage, wfmt(L"%i / %i", curPage, 2));
int i;
if(curPage == 1)
{
m_btnMgr.setText(m_configLbl1, _t("cfgb5", L"Video mode"));
m_btnMgr.setText(m_configLbl2, _t("cfgb6", L"Game language"));
m_btnMgr.setText(m_configLbl3, _t("cfgb2", L"Game loader"));
m_btnMgr.setText(m_configLbl4, _t("cfgb10", L"Devo Emu Memcard"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configLbl4);
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "video_mode", 0)), (int)ARRAY_SIZE(CMenu::_GlobalGCvideoModes) - 1);
m_btnMgr.setText(m_configGCLblGCVideo, _t(CMenu::_GlobalGCvideoModes[i].id, CMenu::_GlobalGCvideoModes[i].text));
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_GlobalGCvideoModes[i].id, CMenu::_GlobalGCvideoModes[i].text));
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "game_language", 0)), (int)ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1);
m_btnMgr.setText(m_configGCLblGCLanguage, _t(CMenu::_GlobalGClanguages[i].id, CMenu::_GlobalGClanguages[i].text));
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_GlobalGClanguages[i].id, CMenu::_GlobalGClanguages[i].text));
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "default_loader", 2)), (int)ARRAY_SIZE(CMenu::_GlobalGCLoaders) - 1);
m_btnMgr.setText(m_configGCLblGCLoader, _t(CMenu::_GlobalGCLoaders[i].id, CMenu::_GlobalGCLoaders[i].text));
m_btnMgr.setText(m_configLbl3Val, _t(CMenu::_GlobalGCLoaders[i].id, CMenu::_GlobalGCLoaders[i].text));
m_btnMgr.setText(m_configGCBtnDevMemCard, m_cfg.getBool(GC_DOMAIN, "devo_memcard_emu", false) ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.setText(m_configBtn4, m_cfg.getBool(GC_DOMAIN, "devo_memcard_emu", false) ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.show(m_configGCLblGCGameLanguage);
m_btnMgr.show(m_configGCLblGCLanguage);
m_btnMgr.show(m_configGCBtnGCLanguageP);
m_btnMgr.show(m_configGCBtnGCLanguageM);
m_btnMgr.show(m_configGCLblGCGameVideo);
m_btnMgr.show(m_configGCLblGCVideo);
m_btnMgr.show(m_configGCBtnGCVideoP);
m_btnMgr.show(m_configGCBtnGCVideoM);
m_btnMgr.show(m_configGCLblGCGameLoader);
m_btnMgr.show(m_configGCLblGCLoader);
m_btnMgr.show(m_configGCBtnGCLoaderP);
m_btnMgr.show(m_configGCBtnGCLoaderM);
m_btnMgr.show(m_configGCLblDevMemCard);
m_btnMgr.show(m_configGCBtnDevMemCard);
m_btnMgr.show(m_configLbl1Val);
m_btnMgr.show(m_configBtn1M);
m_btnMgr.show(m_configBtn1P);
m_btnMgr.show(m_configLbl2Val);
m_btnMgr.show(m_configBtn2M);
m_btnMgr.show(m_configBtn2P);
m_btnMgr.show(m_configLbl3Val);
m_btnMgr.show(m_configBtn3M);
m_btnMgr.show(m_configBtn3P);
m_btnMgr.show(m_configBtn4);
}
else
{
m_btnMgr.setText(m_configLbl1, _t("cfgb11", L"Nintendont Emu Memcard"));
m_btnMgr.setText(m_configLbl2, _t("cfgb12", L"Nintendont Wii U Widescreen"));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configLbl2);
// minus 2 and [i + 1] because there is no global array that does not include 'default'
i = min(max(0, m_cfg.getInt(GC_DOMAIN, "emu_memcard", 1)), (int)ARRAY_SIZE(CMenu::_NinEmuCard) - 2);
m_btnMgr.setText(m_configGCLblNinMemCardVal, _t(CMenu::_NinEmuCard[i + 1].id, CMenu::_NinEmuCard[i + 1].text));
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_NinEmuCard[i + 1].id, CMenu::_NinEmuCard[i + 1].text));
m_btnMgr.setText(m_configGCBtnNinWiiUWide, m_cfg.getBool(GC_DOMAIN, "wiiu_widescreen", false) ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.setText(m_configBtn2, m_cfg.getBool(GC_DOMAIN, "wiiu_widescreen", false) ? _t("on", L"On") : _t("off", L"Off"));
m_btnMgr.show(m_configGCLblNinMemCard);
m_btnMgr.show(m_configGCLblNinMemCardVal);
m_btnMgr.show(m_configGCBtnNinMemCardP);
m_btnMgr.show(m_configGCBtnNinMemCardM);
m_btnMgr.show(m_configGCLblNinWiiUWide);
m_btnMgr.show(m_configGCBtnNinWiiUWide);
m_btnMgr.show(m_configLbl1Val);
m_btnMgr.show(m_configBtn1M);
m_btnMgr.show(m_configBtn1P);
m_btnMgr.show(m_configBtn2);
}
}
@ -198,45 +143,51 @@ void CMenu::_configGC(void)
{
if(m_btnMgr.selected(m_configGCBtnBack))
break;
else if(m_btnMgr.selected(m_configGCBtnGCLanguageP) || m_btnMgr.selected(m_configGCBtnGCLanguageM))
if(curPage == 1)
{
s8 direction = m_btnMgr.selected(m_configGCBtnGCLanguageP) ? 1 : -1;
i = loopNum(m_cfg.getInt(GC_DOMAIN, "game_language", 0) + direction, (int)ARRAY_SIZE(CMenu::_GlobalGClanguages));
m_cfg.setInt(GC_DOMAIN, "game_language", i);
m_btnMgr.setText(m_configGCLblGCLanguage, _t(CMenu::_GlobalGClanguages[i].id, CMenu::_GlobalGClanguages[i].text));
if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M))
{
s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1;
i = loopNum(m_cfg.getInt(GC_DOMAIN, "game_language", 0) + direction, (int)ARRAY_SIZE(CMenu::_GlobalGClanguages));
m_cfg.setInt(GC_DOMAIN, "game_language", i);
m_btnMgr.setText(m_configLbl2Val, _t(CMenu::_GlobalGClanguages[i].id, CMenu::_GlobalGClanguages[i].text));
}
else if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
{
s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
i = loopNum(m_cfg.getInt(GC_DOMAIN, "video_mode", 0) + direction, (int)ARRAY_SIZE(CMenu::_GlobalGCvideoModes));
m_cfg.setInt(GC_DOMAIN, "video_mode", i);
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_GlobalGCvideoModes[i].id, CMenu::_GlobalGCvideoModes[i].text));
}
else if(m_btnMgr.selected(m_configBtn3P) || m_btnMgr.selected(m_configBtn3M))
{
s8 direction = m_btnMgr.selected(m_configBtn3P) ? 1 : -1;
i = loopNum(m_cfg.getInt(GC_DOMAIN, "default_loader", 1) + direction, (int)ARRAY_SIZE(CMenu::_GlobalGCLoaders));
m_cfg.setInt(GC_DOMAIN, "default_loader", i);
m_btnMgr.setText(m_configLbl3Val, _t(CMenu::_GlobalGCLoaders[i].id, CMenu::_GlobalGCLoaders[i].text));
}
else if(m_btnMgr.selected(m_configBtn4))
{
j = !m_cfg.getBool(GC_DOMAIN, "devo_memcard_emu", false);
m_cfg.setBool(GC_DOMAIN, "devo_memcard_emu", j);
m_btnMgr.setText(m_configBtn4, j ? _t("on", L"On") : _t("off", L"Off"));
}
}
else if(m_btnMgr.selected(m_configGCBtnGCVideoP) || m_btnMgr.selected(m_configGCBtnGCVideoM))
else
{
s8 direction = m_btnMgr.selected(m_configGCBtnGCVideoP) ? 1 : -1;
i = loopNum(m_cfg.getInt(GC_DOMAIN, "video_mode", 0) + direction, (int)ARRAY_SIZE(CMenu::_GlobalGCvideoModes));
m_cfg.setInt(GC_DOMAIN, "video_mode", i);
m_btnMgr.setText(m_configGCLblGCVideo, _t(CMenu::_GlobalGCvideoModes[i].id, CMenu::_GlobalGCvideoModes[i].text));
}
else if(m_btnMgr.selected(m_configGCBtnGCLoaderP) || m_btnMgr.selected(m_configGCBtnGCLoaderM))
{
s8 direction = m_btnMgr.selected(m_configGCBtnGCLoaderP) ? 1 : -1;
i = loopNum(m_cfg.getInt(GC_DOMAIN, "default_loader", 1) + direction, (int)ARRAY_SIZE(CMenu::_GlobalGCLoaders));
m_cfg.setInt(GC_DOMAIN, "default_loader", i);
m_btnMgr.setText(m_configGCLblGCLoader, _t(CMenu::_GlobalGCLoaders[i].id, CMenu::_GlobalGCLoaders[i].text));
}
else if(m_btnMgr.selected(m_configGCBtnNinMemCardP) || m_btnMgr.selected(m_configGCBtnNinMemCardM))
{
s8 direction = m_btnMgr.selected(m_configGCBtnNinMemCardP) ? 1 : -1;
i = loopNum(m_cfg.getInt(GC_DOMAIN, "emu_memcard", 1) + direction, (int)ARRAY_SIZE(CMenu::_NinEmuCard) - 1);
m_cfg.setInt(GC_DOMAIN, "emu_memcard", i);
m_btnMgr.setText(m_configGCLblNinMemCardVal, _t(CMenu::_NinEmuCard[i + 1].id, CMenu::_NinEmuCard[i + 1].text));
}
else if(m_btnMgr.selected(m_configGCBtnDevMemCard))
{
j = !m_cfg.getBool(GC_DOMAIN, "devo_memcard_emu", false);
m_cfg.setBool(GC_DOMAIN, "devo_memcard_emu", j);
m_btnMgr.setText(m_configGCBtnDevMemCard, j ? _t("on", L"On") : _t("off", L"Off"));
}
else if(m_btnMgr.selected(m_configGCBtnNinWiiUWide))
{
j = !m_cfg.getBool(GC_DOMAIN, "wiiu_widescreen", false);
m_cfg.setBool(GC_DOMAIN, "wiiu_widescreen", j);
m_btnMgr.setText(m_configGCBtnNinWiiUWide, j ? _t("on", L"On") : _t("off", L"Off"));
if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
{
s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
i = loopNum(m_cfg.getInt(GC_DOMAIN, "emu_memcard", 1) + direction, (int)ARRAY_SIZE(CMenu::_NinEmuCard) - 1);
m_cfg.setInt(GC_DOMAIN, "emu_memcard", i);
m_btnMgr.setText(m_configLbl1Val, _t(CMenu::_NinEmuCard[i + 1].id, CMenu::_NinEmuCard[i + 1].text));
}
else if(m_btnMgr.selected(m_configBtn2))
{
j = !m_cfg.getBool(GC_DOMAIN, "wiiu_widescreen", false);
m_cfg.setBool(GC_DOMAIN, "wiiu_widescreen", j);
m_btnMgr.setText(m_configBtn2, j ? _t("on", L"On") : _t("off", L"Off"));
}
}
}
}
@ -254,66 +205,12 @@ void CMenu::_initConfigGCMenu(void)
m_configGCBtnPageM = _addPicButton("CONFIGGC/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 48, 48);
m_configGCBtnPageP = _addPicButton("CONFIGGC/PAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 172, 400, 48, 48);
//pg 1
m_configGCLblGCGameVideo = _addLabel("CONFIGGC/GC_VIDEO", theme.lblFont, L"", 20, 125, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_configGCLblGCVideo = _addLabel("CONFIGGC/GC_VIDEO_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_configGCBtnGCVideoM = _addPicButton("CONFIGGC/GC_VIDEO_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
m_configGCBtnGCVideoP = _addPicButton("CONFIGGC/GC_VIDEO_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
m_configGCLblGCGameLanguage = _addLabel("CONFIGGC/GC_LANG", theme.lblFont, L"", 20, 185, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_configGCLblGCLanguage = _addLabel("CONFIGGC/GC_LANG_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_configGCBtnGCLanguageM = _addPicButton("CONFIGGC/GC_LANG_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
m_configGCBtnGCLanguageP = _addPicButton("CONFIGGC/GC_LANG_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
m_configGCLblGCGameLoader = _addLabel("CONFIGGC/GC_LOADER", theme.lblFont, L"", 20, 245, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_configGCLblGCLoader = _addLabel("CONFIGGC/GC_LOADER_BTN", theme.btnFont, L"", 468, 250, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_configGCBtnGCLoaderM = _addPicButton("CONFIGGC/GC_LOADER_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 250, 48, 48);
m_configGCBtnGCLoaderP = _addPicButton("CONFIGGC/GC_LOADER_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 250, 48, 48);
m_configGCLblDevMemCard = _addLabel("CONFIGGC/DEV_MEMCARD", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_configGCBtnDevMemCard = _addButton("CONFIGGC/DEV_MEMCARD_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
//pg 2
m_configGCLblNinMemCard = _addLabel("CONFIGGC/NIN_MEMCARD", theme.lblFont, L"", 20, 125, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_configGCLblNinMemCardVal = _addLabel("CONFIGGC/NIN_MEMCARD_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_configGCBtnNinMemCardM = _addPicButton("CONFIGGC/NIN_MEMCARD_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
m_configGCBtnNinMemCardP = _addPicButton("CONFIGGC/NIN_MEMCARD_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
m_configGCLblNinWiiUWide = _addLabel("CONFIGGC/NIN_WIIU_WIDE", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_configGCBtnNinWiiUWide = _addButton("CONFIGGC/NIN_WIIU_WIDE_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
_setHideAnim(m_configGCLblTitle, "CONFIGGC/TITLE", 0, 0, -2.f, 0.f);
_setHideAnim(m_configGCBtnBack, "CONFIGGC/BACK_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_configGCLblPage, "CONFIGGC/PAGE_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_configGCBtnPageM, "CONFIGGC/PAGE_MINUS", 0, 0, 1.f, -1.f);
_setHideAnim(m_configGCBtnPageP, "CONFIGGC/PAGE_PLUS", 0, 0, 1.f, -1.f);
_setHideAnim(m_configGCLblGCGameVideo, "CONFIGGC/GC_VIDEO", 50, 0, -2.f, 0.f);
_setHideAnim(m_configGCLblGCVideo, "CONFIGGC/GC_VIDEO_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCBtnGCVideoM, "CONFIGGC/GC_VIDEO_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCBtnGCVideoP, "CONFIGGC/GC_VIDEO_PLUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCLblGCGameLanguage, "CONFIGGC/GC_LANG", 50, 0, -2.f, 0.f);
_setHideAnim(m_configGCLblGCLanguage, "CONFIGGC/GC_LANG_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCBtnGCLanguageM, "CONFIGGC/GC_LANG_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCBtnGCLanguageP, "CONFIGGC/GC_LANG_PLUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCLblGCGameLoader, "CONFIGGC/GC_LOADER", 50, 0, -2.f, 0.f);
_setHideAnim(m_configGCLblGCLoader, "CONFIGGC/GC_LOADER_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCBtnGCLoaderM, "CONFIGGC/GC_LOADER_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCBtnGCLoaderP, "CONFIGGC/GC_LOADER_PLUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCLblDevMemCard, "CONFIGGC/DEV_MEMCARD", 50, 0, -2.f, 0.f);
_setHideAnim(m_configGCBtnDevMemCard, "CONFIGGC/DEV_MEMCARD_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCLblNinMemCard, "CONFIGGC/NIN_MEMCARD", 50, 0, -2.f, 0.f);
_setHideAnim(m_configGCLblNinMemCardVal, "CONFIGGC/NIN_MEMCARD_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCBtnNinMemCardM, "CONFIGGC/NIN_MEMCARD_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCBtnNinMemCardP, "CONFIGGC/NIN_MEMCARD_PLUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_configGCLblNinWiiUWide, "CONFIGGC/NIN_WIIU_WIDE", 50, 0, -2.f, 0.f);
_setHideAnim(m_configGCBtnNinWiiUWide, "CONFIGGC/NIN_WIIU_WIDE_BTN", -50, 0, 1.f, 0.f);
_hideConfigGC(true);
_textConfigGC();
}
@ -322,11 +219,4 @@ void CMenu::_textConfigGC(void)
{
m_btnMgr.setText(m_configGCLblTitle, _t("cfgb8", L"GC Default Settings"));
m_btnMgr.setText(m_configGCBtnBack, _t("cfg10", L"Back"));
m_btnMgr.setText(m_configGCLblGCGameVideo, _t("cfgb5", L"Video mode"));
m_btnMgr.setText(m_configGCLblGCGameLanguage, _t("cfgb6", L"Game language"));
m_btnMgr.setText(m_configGCLblGCGameLoader, _t("cfgb2", L"Game loader"));
m_btnMgr.setText(m_configGCLblDevMemCard, _t("cfgb10", L"Devo Emu Memcard"));
m_btnMgr.setText(m_configGCLblNinMemCard, _t("cfgb11", L"Nintendont Emu Memcard"));
m_btnMgr.setText(m_configGCLblNinWiiUWide, _t("cfgb12", L"Nintendont Wii U Widescreen"));
}

View File

@ -77,14 +77,8 @@ wstringEx CMenu::_getChannelName()
return channelName;
}
void CMenu::_hideConfigMain(bool instant)
void CMenu::_hideConfigButtons(bool instant)
{
m_btnMgr.hide(m_configLblTitle, instant);
m_btnMgr.hide(m_configBtnBack, instant);
m_btnMgr.hide(m_configLblPage, instant);
m_btnMgr.hide(m_configBtnPageM, instant);
m_btnMgr.hide(m_configBtnPageP, instant);
m_btnMgr.hide(m_configLbl1, instant);
m_btnMgr.hide(m_configBtn1, instant);
m_btnMgr.hide(m_configLbl2, instant);
@ -109,6 +103,17 @@ void CMenu::_hideConfigMain(bool instant)
m_btnMgr.hide(m_configLbl4Val, instant);
m_btnMgr.hide(m_configBtn4M, instant);
m_btnMgr.hide(m_configBtn4P, instant);
}
void CMenu::_hideConfigMain(bool instant)
{
m_btnMgr.hide(m_configLblTitle, instant);
m_btnMgr.hide(m_configBtnBack, instant);
m_btnMgr.hide(m_configLblPage, instant);
m_btnMgr.hide(m_configBtnPageM, instant);
m_btnMgr.hide(m_configBtnPageP, instant);
_hideConfigButtons(instant);
for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
if(m_configLblUser[i] != -1)

View File

@ -43,7 +43,7 @@ void CMenu::_sourceFlow()
sm_numbers[sm_numbers.size() - 1] = std::to_string(hdr->settings[0]);// hdr->settings[0] is the number of the source menu button.
// create string of numbers to save in wiiflow_lite.ini.
numbers = sm_numbers[0];
for(u8 i = 1; i < sm_numbers.size(); i++)
for(i = 1; i < sm_numbers.size(); i++)
numbers.append(',' + sm_numbers[i]);
m_cfg.setString(SOURCEFLOW_DOMAIN, "numbers", numbers);
@ -116,7 +116,7 @@ void CMenu::_sourceFlow()
}
trs = tiers[0];
numbers = sm_numbers[0];
for(u8 i = 1; i < tiers.size(); i++)
for(i = 1; i < tiers.size(); i++)
{
trs.append(',' + tiers[i]);
numbers.append(',' + sm_numbers[i]);
@ -375,6 +375,7 @@ bool CMenu::_Source()
channels_type = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
sm_numbers_backup = m_cfg.getString(SOURCEFLOW_DOMAIN, "numbers");//backup for possible restore later
sm_tiers_backup = m_cfg.getString(SOURCEFLOW_DOMAIN, "tiers");
u8 selected_button = 0;
SetupInput();
_showSource();
@ -458,7 +459,8 @@ bool CMenu::_Source()
if(m_btnMgr.selected(m_sourceBtnSource[i]))
{
memset(btn_selected, 0, 16);
strncpy(btn_selected, fmt("BUTTON_%i", nonHiddenSources[i + j]), 15);
selected_button = nonHiddenSources[i + j];
strncpy(btn_selected, fmt("BUTTON_%i", selected_button), 15);
source = m_source.getString(btn_selected, "source", "");
break;
}
@ -535,7 +537,7 @@ bool CMenu::_Source()
}
string trs = tiers[0];
string numbers = sm_numbers[0];
for(u8 i = 1; i < tiers.size(); i++)
for(i = 1; i < tiers.size(); i++)
{
trs.append(',' + tiers[i]);
numbers.append(',' + sm_numbers[i]);
@ -599,10 +601,9 @@ bool CMenu::_Source()
if(exitSource)// a new source has been chosen
{
// save source number for return
sm_numbers.pop_back();
sm_numbers.push_back(std::to_string(i + j));
sm_numbers[sm_numbers.size() - 1] = std::to_string(selected_button);
string numbers = sm_numbers[0];
for(u8 i = 1; i < sm_numbers.size(); i++)
for(i = 1; i < sm_numbers.size(); i++)
numbers.append(',' + sm_numbers[i]);
m_cfg.setString(SOURCEFLOW_DOMAIN, "numbers", numbers);
m_cfg.setUInt("GENERAL", "sources", m_current_view);