mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +01:00
- rewrote main config to re-use buttons for every page.
- fixed using 1 or 2 to change sourceflow. - fixed deleting cached wfc cover when you use X to delete a game. - fixed showing number of games when you turn favorites on or off.
This commit is contained in:
parent
dff4272de0
commit
fe2c4d50ce
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 4.4 MiB |
@ -490,7 +490,7 @@ void CMenu::cleanup()
|
||||
CoverFlow.shutdown(); /* possibly plugin flow crash so cleanup early */
|
||||
m_banner.DeleteBanner();
|
||||
m_plugin.Cleanup();
|
||||
m_source.unload();
|
||||
m_source.save(true);
|
||||
m_platform.unload();
|
||||
m_loc.unload();
|
||||
|
||||
@ -1262,14 +1262,14 @@ void CMenu::_buildMenus(void)
|
||||
_initErrorMenu();
|
||||
_initWad();
|
||||
_initWBFSMenu();
|
||||
_initConfigAdvMenu();
|
||||
_initConfigSndMenu();
|
||||
_initConfig4Menu();
|
||||
_initConfigScreenMenu();
|
||||
_initConfig3Menu();
|
||||
//_initConfigAdvMenu();
|
||||
//_initConfigSndMenu();
|
||||
//_initConfig4Menu();
|
||||
//_initConfigScreenMenu();
|
||||
//_initConfig3Menu();
|
||||
_initConfigMenu();
|
||||
_initConfigGCMenu();
|
||||
_initConfig7Menu();
|
||||
//_initConfig7Menu();
|
||||
_initPartitionsCfgMenu();
|
||||
_initGameMenu();
|
||||
_initDownloadMenu();
|
||||
@ -1982,12 +1982,12 @@ void CMenu::_updateText(void)
|
||||
_textPluginSettings();
|
||||
_textCategorySettings();
|
||||
_textCheatSettings();
|
||||
_textConfig();
|
||||
_textConfig3();
|
||||
_textConfigScreen();
|
||||
_textConfig4();
|
||||
_textConfigAdv();
|
||||
_textConfigSnd();
|
||||
//_textConfig();
|
||||
//_textConfig3();
|
||||
//_textConfigScreen();
|
||||
//_textConfig4();
|
||||
//_textConfigAdv();
|
||||
//_textConfigSnd();
|
||||
_textConfigGC();
|
||||
_textPartitionsCfg();
|
||||
_textCfgHB();
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::min;
|
||||
|
||||
class CMenu
|
||||
{
|
||||
@ -188,12 +189,12 @@ private:
|
||||
//
|
||||
TexData m_errorBg;
|
||||
TexData m_configBg;
|
||||
TexData m_config3Bg;
|
||||
TexData m_configScreenBg;
|
||||
TexData m_config4Bg;
|
||||
TexData m_configAdvBg;
|
||||
TexData m_configSndBg;
|
||||
TexData m_config7Bg;
|
||||
//TexData m_config3Bg;
|
||||
//TexData m_configScreenBg;
|
||||
//TexData m_config4Bg;
|
||||
//TexData m_configAdvBg;
|
||||
//TexData m_configSndBg;
|
||||
//TexData m_config7Bg;
|
||||
TexData m_cheatBg;
|
||||
TexData m_downloadBg;
|
||||
TexData m_gameinfoBg;
|
||||
@ -242,8 +243,35 @@ private:
|
||||
s16 m_configBtnPageM;
|
||||
s16 m_configBtnPageP;
|
||||
s16 m_configBtnBack;
|
||||
s16 m_configLblTitle;
|
||||
s16 m_configLblTitle;
|
||||
s16 m_configLblUser[4];
|
||||
|
||||
s16 m_configLbl1;
|
||||
s16 m_configLbl2;
|
||||
s16 m_configLbl3;
|
||||
s16 m_configLbl4;
|
||||
|
||||
s16 m_configBtn1;
|
||||
s16 m_configBtn2;
|
||||
s16 m_configBtn3;
|
||||
s16 m_configBtn4;
|
||||
|
||||
s16 m_configLbl1Val;
|
||||
s16 m_configBtn1M;
|
||||
s16 m_configBtn1P;
|
||||
|
||||
s16 m_configLbl2Val;
|
||||
s16 m_configBtn2M;
|
||||
s16 m_configBtn2P;
|
||||
|
||||
s16 m_configLbl3Val;
|
||||
s16 m_configBtn3M;
|
||||
s16 m_configBtn3P;
|
||||
|
||||
s16 m_configLbl4Val;
|
||||
s16 m_configBtn4M;
|
||||
s16 m_configBtn4P;
|
||||
/*
|
||||
s16 m_configLblDownload;
|
||||
s16 m_configBtnDownload;
|
||||
s16 m_configLblParental;
|
||||
@ -253,7 +281,6 @@ private:
|
||||
s16 m_configBtnPartition;
|
||||
s16 m_configLblCfg4;
|
||||
s16 m_configBtnCfg4;
|
||||
s16 m_configLblUser[4];
|
||||
|
||||
s16 m_configAdvLblTheme;
|
||||
s16 m_configAdvLblCurTheme;
|
||||
@ -350,7 +377,7 @@ private:
|
||||
s16 m_config7Btn4M;
|
||||
s16 m_config7Btn4P;
|
||||
s16 m_config7LblUser[4];
|
||||
|
||||
*/
|
||||
//Download menu
|
||||
s16 m_downloadPrioVal;
|
||||
enum CoverPrio
|
||||
@ -956,13 +983,13 @@ private:
|
||||
void _initMainMenu();
|
||||
void _initErrorMenu();
|
||||
void _initConfigMenu();
|
||||
void _initConfigAdvMenu();
|
||||
void _initConfig3Menu();
|
||||
void _initConfig4Menu();
|
||||
void _initConfigSndMenu();
|
||||
void _initConfigScreenMenu();
|
||||
//void _initConfigAdvMenu();
|
||||
//void _initConfig3Menu();
|
||||
//void _initConfig4Menu();
|
||||
//void _initConfigSndMenu();
|
||||
//void _initConfigScreenMenu();
|
||||
void _initConfigGCMenu();
|
||||
void _initConfig7Menu();
|
||||
//void _initConfig7Menu();
|
||||
void _initPartitionsCfgMenu();
|
||||
void _initGameMenu();
|
||||
void _initDownloadMenu();
|
||||
@ -994,11 +1021,11 @@ private:
|
||||
void _textCheatSettings(void);
|
||||
void _textError(void);
|
||||
void _textConfig(void);
|
||||
void _textConfig3(void);
|
||||
void _textConfigScreen(void);
|
||||
void _textConfig4(void);
|
||||
void _textConfigAdv(void);
|
||||
void _textConfigSnd(void);
|
||||
//void _textConfig3(void);
|
||||
//void _textConfigScreen(void);
|
||||
//void _textConfig4(void);
|
||||
//void _textConfigAdv(void);
|
||||
//void _textConfigSnd(void);
|
||||
void _textConfigGC(void);
|
||||
void _textPartitionsCfg(void);
|
||||
void _textGame(void);
|
||||
@ -1022,16 +1049,16 @@ private:
|
||||
void _hideCheatSettings(bool instant = false);
|
||||
void _hideError(bool instant = false);
|
||||
void _hideMain(bool instant = false);
|
||||
void _hideConfigCommon(bool instant = false);
|
||||
void _hideConfig(bool instant = false);
|
||||
void _hideConfig3(bool instant = false);
|
||||
void _hideConfigScreen(bool instant = false);
|
||||
void _hideConfig4(bool instant = false);
|
||||
void _hideConfigAdv(bool instant = false);
|
||||
void _hideConfigSnd(bool instant = false);
|
||||
//void _hideConfigCommon(bool instant = false);
|
||||
void _hideConfigMain(bool instant = false);
|
||||
//void _hideConfig3(bool instant = false);
|
||||
//void _hideConfigScreen(bool instant = false);
|
||||
//void _hideConfig4(bool instant = false);
|
||||
//void _hideConfigAdv(bool instant = false);
|
||||
//void _hideConfigSnd(bool instant = false);
|
||||
void _hideConfigGC(bool instant = false);
|
||||
void _hideConfigGCPage(bool instant = false);
|
||||
void _hideConfig7(bool instant = false);
|
||||
//void _hideConfig7(bool instant = false);
|
||||
void _hidePartitionsCfg(bool instant = false);
|
||||
void _hideGame(bool instant = false);
|
||||
void _hideDownload(bool instant = false);
|
||||
@ -1061,16 +1088,16 @@ private:
|
||||
//
|
||||
void _showError(void);
|
||||
void _showMain(void);
|
||||
void _showConfigCommon(const TexData & bg, int page);
|
||||
void _showConfig(void);
|
||||
void _showConfig3(void);
|
||||
void _showConfigScreen(void);
|
||||
void _showConfig4(void);
|
||||
void _showConfigAdv(void);
|
||||
void _showConfigSnd(void);
|
||||
//void _showConfigCommon(const TexData & bg, int page);
|
||||
void _showConfigMain(int curPage);
|
||||
//void _showConfig3(void);
|
||||
//void _showConfigScreen(void);
|
||||
//void _showConfig4(void);
|
||||
//void _showConfigAdv(void);
|
||||
//void _showConfigSnd(void);
|
||||
void _showConfigGC(void);
|
||||
void _showConfigGCPage(void);
|
||||
void _showConfig7(int curPage);
|
||||
//void _showConfig7(int curPage);
|
||||
void _showPartitionsCfg(void);
|
||||
void _showNandEmu(void);
|
||||
void _showGame(void);
|
||||
@ -1119,16 +1146,18 @@ private:
|
||||
void _setCFVersion(int version);
|
||||
int _getCFVersion(void);
|
||||
//
|
||||
void _config(int page);
|
||||
int _configCommon(void);
|
||||
int _config1(void);
|
||||
int _config3(void);
|
||||
int _configScreen(void);
|
||||
int _config4(void);
|
||||
int _configAdv(void);
|
||||
int _configSnd(void);
|
||||
//void _config(void);
|
||||
void _configMain(void);
|
||||
//int _configCommon(void);
|
||||
wstringEx _getChannelName(void);
|
||||
//int _config1(void);
|
||||
//int _config3(void);
|
||||
//int _configScreen(void);
|
||||
//int _config4(void);
|
||||
//int _configAdv(void);
|
||||
//int _configSnd(void);
|
||||
void _configGC(void);
|
||||
int _config7(int curPage);
|
||||
//int _config7(int curPage);
|
||||
void _partitionsCfg(void);
|
||||
int _NandEmuCfg(void);
|
||||
int _AutoExtractSave(string gameId);
|
||||
|
@ -89,10 +89,10 @@ void CMenu::_showAbout(void)
|
||||
|
||||
void CMenu::_initAboutMenu()
|
||||
{
|
||||
_addUserLabels(m_aboutLblUser, 0, 2, "ABOUT");
|
||||
_addUserLabels(m_aboutLblUser, 0, 2, "ABOUT");// user labels 1 and 2 below everything.
|
||||
m_aboutBg = _texture("ABOUT/BG", "texture", theme.bg, false);
|
||||
m_aboutLblInfo = _addLabel("ABOUT/INFO", theme.txtFont, L"", 40, 80, 560, 300, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
|
||||
_addUserLabels(m_aboutLblUser, 2, 2, "ABOUT");
|
||||
_addUserLabels(m_aboutLblUser, 2, 2, "ABOUT");// user labels 3 and 4 above the scrolling text.
|
||||
m_aboutLblTitle = _addLabel("ABOUT/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
m_aboutLblIOS = _addLabel("ABOUT/IOS", theme.lblFont, L"", 240, 400, 360, 56, theme.lblFontColor, FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_MIDDLE);
|
||||
|
||||
|
@ -1,249 +0,0 @@
|
||||
|
||||
#include "menu.hpp"
|
||||
#include "channel/nand.hpp"
|
||||
#include "loader/nk.h"
|
||||
|
||||
const int CMenu::_nbCfgPages = 14;
|
||||
|
||||
void CMenu::_hideConfigCommon(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);
|
||||
}
|
||||
|
||||
void CMenu::_hideConfig(bool instant)
|
||||
{
|
||||
_hideConfigCommon(instant);
|
||||
|
||||
m_btnMgr.hide(m_configLblPartition, instant);
|
||||
m_btnMgr.hide(m_configBtnPartition, instant);
|
||||
m_btnMgr.hide(m_configLblDownload, instant);
|
||||
m_btnMgr.hide(m_configBtnDownload, instant);
|
||||
m_btnMgr.hide(m_configLblParental, instant);
|
||||
m_btnMgr.hide(m_configBtnUnlock, instant);
|
||||
m_btnMgr.hide(m_configBtnSetCode, instant);
|
||||
m_btnMgr.hide(m_configLblCfg4, instant);
|
||||
m_btnMgr.hide(m_configBtnCfg4, instant);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
|
||||
if(m_configLblUser[i] != -1)
|
||||
m_btnMgr.hide(m_configLblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_showConfigCommon(const TexData &bg, int page)
|
||||
{
|
||||
_setBg(bg, bg);
|
||||
m_btnMgr.show(m_configLblTitle);
|
||||
m_btnMgr.show(m_configBtnBack);
|
||||
m_btnMgr.show(m_configLblPage);
|
||||
m_btnMgr.show(m_configBtnPageM);
|
||||
m_btnMgr.show(m_configBtnPageP);
|
||||
m_btnMgr.setText(m_configLblPage, wfmt(L"%i / %i", page, m_locked ? page : _nbCfgPages));
|
||||
}
|
||||
|
||||
void CMenu::_showConfig(void)
|
||||
{
|
||||
_showConfigCommon(m_configBg, 1);
|
||||
|
||||
if(!m_locked)
|
||||
{
|
||||
m_btnMgr.show(m_configLblDownload);
|
||||
m_btnMgr.show(m_configBtnDownload);
|
||||
|
||||
m_btnMgr.show(m_configLblPartition);
|
||||
m_btnMgr.show(m_configBtnPartition);
|
||||
|
||||
m_btnMgr.show(m_configLblCfg4);
|
||||
m_btnMgr.show(m_configBtnCfg4);
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
|
||||
if(m_configLblUser[i] != -1)
|
||||
m_btnMgr.show(m_configLblUser[i]);
|
||||
}
|
||||
m_btnMgr.show(m_configLblParental);
|
||||
m_btnMgr.show(m_locked ? m_configBtnUnlock : m_configBtnSetCode);
|
||||
}
|
||||
|
||||
void CMenu::_config(int page)
|
||||
{
|
||||
int change = CONFIG_PAGE_NO_CHANGE;
|
||||
while(!m_exit)
|
||||
{
|
||||
switch(page)
|
||||
{
|
||||
case 1:
|
||||
change = _config1();
|
||||
break;
|
||||
case 2:
|
||||
change = _configAdv();
|
||||
break;
|
||||
case 3:
|
||||
change = _config3();
|
||||
break;
|
||||
case 4:
|
||||
change = _config4();
|
||||
break;
|
||||
case 5:
|
||||
change = _configSnd();
|
||||
break;
|
||||
case 6:
|
||||
change = _configScreen();
|
||||
break;
|
||||
default:
|
||||
change = _config7(page);
|
||||
break;
|
||||
}
|
||||
if(change == CONFIG_PAGE_BACK)
|
||||
break;
|
||||
if(!m_locked)
|
||||
{
|
||||
// assumes change is in the range of CONFIG_PAGE_DEC to CONFIG_PAGE_INC
|
||||
page += change;
|
||||
if (page > _nbCfgPages)
|
||||
page = 1;
|
||||
else if (page <= 0)
|
||||
page = _nbCfgPages;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int CMenu::_configCommon(void)
|
||||
{
|
||||
_mainLoopCommon();
|
||||
if (BTN_HOME_PRESSED || BTN_B_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_configBtnBack)))
|
||||
return CONFIG_PAGE_BACK;
|
||||
else if (BTN_UP_PRESSED)
|
||||
m_btnMgr.up();
|
||||
else if (BTN_DOWN_PRESSED)
|
||||
m_btnMgr.down();
|
||||
else if (BTN_LEFT_PRESSED || BTN_MINUS_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_configBtnPageM)))
|
||||
{
|
||||
if(BTN_LEFT_PRESSED || BTN_MINUS_PRESSED) m_btnMgr.click(m_configBtnPageM);
|
||||
return CONFIG_PAGE_DEC;
|
||||
}
|
||||
else if (BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_configBtnPageP)))
|
||||
{
|
||||
if(BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED) m_btnMgr.click(m_configBtnPageP);
|
||||
return CONFIG_PAGE_INC;
|
||||
}
|
||||
return CONFIG_PAGE_NO_CHANGE;
|
||||
}
|
||||
|
||||
int CMenu::_config1(void)
|
||||
{
|
||||
int change = CONFIG_PAGE_NO_CHANGE;
|
||||
|
||||
SetupInput();
|
||||
_showConfig();
|
||||
|
||||
while(!m_exit)
|
||||
{
|
||||
change = _configCommon();
|
||||
if (change != CONFIG_PAGE_NO_CHANGE)
|
||||
break;
|
||||
|
||||
if (BTN_A_PRESSED)
|
||||
{
|
||||
if (m_btnMgr.selected(m_configBtnDownload))
|
||||
{
|
||||
_hideConfig();
|
||||
_download();
|
||||
_showConfig();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configBtnUnlock))
|
||||
{
|
||||
char code[4];
|
||||
_hideConfig();
|
||||
if (_code(code) && memcmp(code, m_cfg.getString("GENERAL", "parent_code", "").c_str(), 4) == 0)
|
||||
{
|
||||
m_refreshGameList = true;
|
||||
m_locked = false;
|
||||
}
|
||||
else
|
||||
error(_t("cfgg25",L"Password incorrect."));
|
||||
_showConfig();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configBtnSetCode))
|
||||
{
|
||||
char code[4];
|
||||
_hideConfig();
|
||||
if (_code(code, true))
|
||||
{
|
||||
m_refreshGameList = true;
|
||||
m_cfg.setString("GENERAL", "parent_code", string(code, 4).c_str());
|
||||
m_locked = true;
|
||||
}
|
||||
_showConfig();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configBtnPartition))
|
||||
{
|
||||
_hideConfig();
|
||||
_partitionsCfg();
|
||||
_showConfig();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configBtnCfg4))
|
||||
{
|
||||
_hideConfig();
|
||||
_NandEmuCfg();
|
||||
_showConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
_hideConfig();
|
||||
return change;
|
||||
}
|
||||
|
||||
void CMenu::_initConfigMenu()
|
||||
{
|
||||
_addUserLabels(m_configLblUser, ARRAY_SIZE(m_configLblUser), "CONFIG");
|
||||
m_configBg = _texture("CONFIG/BG", "texture", theme.bg, false);
|
||||
m_configLblTitle = _addLabel("CONFIG/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
m_configLblDownload = _addLabel("CONFIG/DOWNLOAD", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configBtnDownload = _addButton("CONFIG/DOWNLOAD_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
|
||||
m_configLblParental = _addLabel("CONFIG/PARENTAL", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configBtnUnlock = _addButton("CONFIG/UNLOCK_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
|
||||
m_configBtnSetCode = _addButton("CONFIG/SETCODE_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
|
||||
m_configLblPartition = _addLabel("CONFIG/PARTITION", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configBtnPartition = _addButton("CONFIG/PARTITION_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
||||
m_configLblCfg4 = _addLabel("CONFIG/CFG4", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configBtnCfg4 = _addButton("CONFIG/CFG4_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
|
||||
m_configLblPage = _addLabel("CONFIG/PAGE_BTN", theme.btnFont, L"", 68, 400, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configBtnPageM = _addPicButton("CONFIG/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 48, 48);
|
||||
m_configBtnPageP = _addPicButton("CONFIG/PAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 172, 400, 48, 48);
|
||||
m_configBtnBack = _addButton("CONFIG/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
|
||||
|
||||
_setHideAnim(m_configLblTitle, "CONFIG/TITLE", 0, 0, -2.f, 0.f);
|
||||
|
||||
_setHideAnim(m_configLblDownload, "CONFIG/DOWNLOAD", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configBtnDownload, "CONFIG/DOWNLOAD_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configLblParental, "CONFIG/PARENTAL", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configBtnUnlock, "CONFIG/UNLOCK_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configBtnSetCode, "CONFIG/SETCODE_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configLblPartition, "CONFIG/PARTITION", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configBtnPartition, "CONFIG/PARTITION_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configLblCfg4, "CONFIG/CFG4", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configBtnCfg4, "CONFIG/CFG4_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configBtnBack, "CONFIG/BACK_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_configLblPage, "CONFIG/PAGE_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_configBtnPageM, "CONFIG/PAGE_MINUS", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_configBtnPageP, "CONFIG/PAGE_PLUS", 0, 0, 1.f, -1.f);
|
||||
_hideConfig(true);
|
||||
_textConfig();
|
||||
}
|
||||
|
||||
void CMenu::_textConfig(void)
|
||||
{
|
||||
m_btnMgr.setText(m_configLblTitle, _t("cfg1", L"Settings"));
|
||||
m_btnMgr.setText(m_configLblDownload, _t("cfg3", L"Download covers & banners"));
|
||||
m_btnMgr.setText(m_configBtnDownload, _t("cfgc5", L"Go"));
|
||||
m_btnMgr.setText(m_configLblParental, _t("cfg5", L"Parental control"));
|
||||
m_btnMgr.setText(m_configBtnUnlock, _t("cfg6", L"Unlock"));
|
||||
m_btnMgr.setText(m_configBtnSetCode, _t("cfg7", L"Set code"));
|
||||
m_btnMgr.setText(m_configLblPartition, _t("cfg17", L"Game Partitions"));
|
||||
m_btnMgr.setText(m_configBtnPartition, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_configLblCfg4, _t("cfg13", L"NAND Emulation Settings"));
|
||||
m_btnMgr.setText(m_configBtnCfg4, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_configBtnBack, _t("cfg10", L"Back"));
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
|
||||
#include "menu.hpp"
|
||||
|
||||
template <class T> static inline T loopNum(T i, T s)
|
||||
{
|
||||
return (i + s) % s;
|
||||
}
|
||||
|
||||
void CMenu::_hideConfig3(bool instant)
|
||||
{
|
||||
_hideConfigCommon(instant);
|
||||
|
||||
m_btnMgr.hide(m_config3LblGameLanguage, instant);
|
||||
m_btnMgr.hide(m_config3LblLanguage, instant);
|
||||
m_btnMgr.hide(m_config3BtnLanguageP, instant);
|
||||
m_btnMgr.hide(m_config3BtnLanguageM, instant);
|
||||
|
||||
m_btnMgr.hide(m_config3LblGameVideo, instant);
|
||||
m_btnMgr.hide(m_config3LblVideo, instant);
|
||||
m_btnMgr.hide(m_config3BtnVideoP, instant);
|
||||
m_btnMgr.hide(m_config3BtnVideoM, instant);
|
||||
|
||||
m_btnMgr.hide(m_config3LblGCDefaults, instant);
|
||||
m_btnMgr.hide(m_config3BtnGCDefaults, instant);
|
||||
|
||||
m_btnMgr.hide(m_config3LblChannelsType, instant);
|
||||
m_btnMgr.hide(m_config3LblChannelsTypeVal, instant);
|
||||
m_btnMgr.hide(m_config3BtnChannelsTypeP, instant);
|
||||
m_btnMgr.hide(m_config3BtnChannelsTypeM, instant);
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_config3LblUser); ++i)
|
||||
if(m_config3LblUser[i] != -1)
|
||||
m_btnMgr.hide(m_config3LblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_showConfig3(void)
|
||||
{
|
||||
_showConfigCommon(m_config3Bg, 3);
|
||||
|
||||
m_btnMgr.show(m_config3LblGameLanguage);
|
||||
m_btnMgr.show(m_config3LblLanguage);
|
||||
m_btnMgr.show(m_config3BtnLanguageP);
|
||||
m_btnMgr.show(m_config3BtnLanguageM);
|
||||
|
||||
m_btnMgr.show(m_config3LblGameVideo);
|
||||
m_btnMgr.show(m_config3LblVideo);
|
||||
m_btnMgr.show(m_config3BtnVideoP);
|
||||
m_btnMgr.show(m_config3BtnVideoM);
|
||||
|
||||
m_btnMgr.show(m_config3LblGCDefaults);
|
||||
m_btnMgr.show(m_config3BtnGCDefaults);
|
||||
|
||||
m_btnMgr.show(m_config3LblChannelsType);
|
||||
m_btnMgr.show(m_config3LblChannelsTypeVal);
|
||||
m_btnMgr.show(m_config3BtnChannelsTypeP);
|
||||
m_btnMgr.show(m_config3BtnChannelsTypeM);
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_config3LblUser); ++i)
|
||||
if(m_config3LblUser[i] != -1)
|
||||
m_btnMgr.show(m_config3LblUser[i]);
|
||||
|
||||
int i = min(max(0, m_cfg.getInt("GENERAL", "video_mode", 0)), (int)ARRAY_SIZE(CMenu::_GlobalVideoModes) - 1);
|
||||
m_btnMgr.setText(m_config3LblVideo, _t(CMenu::_GlobalVideoModes[i].id, CMenu::_GlobalVideoModes[i].text));
|
||||
|
||||
i = min(max(0, m_cfg.getInt("GENERAL", "game_language", 0)), (int)ARRAY_SIZE(CMenu::_languages) - 1);
|
||||
m_btnMgr.setText(m_config3LblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
|
||||
|
||||
i = min(max(1, m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL)), (int)ARRAY_SIZE(CMenu::_ChannelsType)) - 1;
|
||||
m_btnMgr.setText(m_config3LblChannelsTypeVal, _t(CMenu::_ChannelsType[i].id, CMenu::_ChannelsType[i].text));
|
||||
}
|
||||
|
||||
int CMenu::_config3(void)
|
||||
{
|
||||
int change = CONFIG_PAGE_NO_CHANGE;
|
||||
|
||||
_showConfig3();
|
||||
while(!m_exit)
|
||||
{
|
||||
change = _configCommon();
|
||||
if (change != CONFIG_PAGE_NO_CHANGE)
|
||||
break;
|
||||
if (BTN_A_PRESSED)
|
||||
{
|
||||
if (m_btnMgr.selected(m_config3BtnLanguageP) || m_btnMgr.selected(m_config3BtnLanguageM))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config3BtnLanguageP) ? 1 : -1;
|
||||
m_cfg.setInt("GENERAL", "game_language", (int)loopNum(m_cfg.getUInt("GENERAL", "game_language", 0) + direction, ARRAY_SIZE(CMenu::_languages)));
|
||||
_showConfig3();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config3BtnVideoP) || m_btnMgr.selected(m_config3BtnVideoM))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config3BtnVideoP) ? 1 : -1;
|
||||
m_cfg.setInt("GENERAL", "video_mode", (int)loopNum(m_cfg.getUInt("GENERAL", "video_mode", 0) + direction, ARRAY_SIZE(CMenu::_GlobalVideoModes)));
|
||||
_showConfig3();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config3BtnGCDefaults))
|
||||
{
|
||||
_hideConfig3();
|
||||
_configGC();
|
||||
_showConfig3();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config3BtnChannelsTypeP) || m_btnMgr.selected(m_config3BtnChannelsTypeM))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config3BtnChannelsTypeP) ? 1 : -1;
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "channels_type", 1 + (int)loopNum(m_cfg.getUInt(CHANNEL_DOMAIN, "channels_type", 1) - 1 + direction, ARRAY_SIZE(CMenu::_ChannelsType)));
|
||||
_showConfig3();
|
||||
if(m_current_view & COVERFLOW_CHANNEL || m_current_view & COVERFLOW_PLUGIN)
|
||||
m_refreshGameList = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
_hideConfig3();
|
||||
return change;
|
||||
}
|
||||
|
||||
void CMenu::_initConfig3Menu()
|
||||
{
|
||||
_addUserLabels(m_config3LblUser, ARRAY_SIZE(m_config3LblUser), "CONFIG3");
|
||||
m_config3Bg = _texture("CONFIG3/BG", "texture", theme.bg, false);
|
||||
|
||||
m_config3LblGameVideo = _addLabel("CONFIG3/VIDEO", theme.lblFont, L"", 20, 125, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3LblVideo = _addLabel("CONFIG3/VIDEO_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config3BtnVideoM = _addPicButton("CONFIG3/VIDEO_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
|
||||
m_config3BtnVideoP = _addPicButton("CONFIG3/VIDEO_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
|
||||
|
||||
m_config3LblGameLanguage = _addLabel("CONFIG3/GAME_LANG", theme.lblFont, L"", 20, 185, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3LblLanguage = _addLabel("CONFIG3/GAME_LANG_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config3BtnLanguageM = _addPicButton("CONFIG3/GAME_LANG_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
|
||||
m_config3BtnLanguageP = _addPicButton("CONFIG3/GAME_LANG_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
|
||||
|
||||
m_config3LblGCDefaults = _addLabel("CONFIG3/GC_DEFAULTS", theme.lblFont, L"", 20, 245, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3BtnGCDefaults = _addButton("CONFIG3/GC_DEFAULTS_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
||||
|
||||
m_config3LblChannelsType = _addLabel("CONFIG3/CHANNELS_TYPE", theme.lblFont, L"", 20, 305, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config3LblChannelsTypeVal = _addLabel("CONFIG3/CHANNELS_TYPE_BTN", theme.btnFont, L"", 468, 310, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config3BtnChannelsTypeM = _addPicButton("CONFIG3/CHANNELS_TYPE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48);
|
||||
m_config3BtnChannelsTypeP = _addPicButton("CONFIG3/CHANNELS_TYPE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48);
|
||||
|
||||
_setHideAnim(m_config3LblGameVideo, "CONFIG3/VIDEO", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3LblVideo, "CONFIG3/VIDEO_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnVideoM, "CONFIG3/VIDEO_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnVideoP, "CONFIG3/VIDEO_PLUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3LblGameLanguage, "CONFIG3/GAME_LANG", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3LblLanguage, "CONFIG3/GAME_LANG_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnLanguageM, "CONFIG3/GAME_LANG_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnLanguageP, "CONFIG3/GAME_LANG_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_config3LblGCDefaults, "CONFIG3/GC_DEFAULTS", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3BtnGCDefaults, "CONFIG3/GC_DEFAULTS_BTN", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_config3LblChannelsType, "CONFIG3/CHANNELS_TYPE", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config3LblChannelsTypeVal, "CONFIG3/CHANNELS_TYPE_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnChannelsTypeM, "CONFIG3/CHANNELS_TYPE_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config3BtnChannelsTypeP, "CONFIG3/CHANNELS_TYPE_PLUS", -50, 0, 1.f, 0.f);
|
||||
_hideConfig3(true);
|
||||
_textConfig3();
|
||||
}
|
||||
|
||||
void CMenu::_textConfig3(void)
|
||||
{
|
||||
m_btnMgr.setText(m_config3LblGameVideo, _t("cfgb3", L"Default video mode"));
|
||||
m_btnMgr.setText(m_config3LblGameLanguage, _t("cfgb4", L"Default game language"));
|
||||
m_btnMgr.setText(m_config3LblGCDefaults, _t("cfgb9", L"GameCube default settings"));
|
||||
m_btnMgr.setText(m_config3BtnGCDefaults, _t("dl16", L"Set"));
|
||||
m_btnMgr.setText(m_config3LblChannelsType, _t("cfgb7", L"Channels Type"));
|
||||
}
|
||||
|
@ -1,180 +0,0 @@
|
||||
|
||||
#include "menu.hpp"
|
||||
#include "channel/channels.h"
|
||||
|
||||
Config custom_titles;
|
||||
int currentChannelIndex = -1;
|
||||
int amountOfChannels = -1;
|
||||
|
||||
template <class T> static inline T loopNum(T i, T s)
|
||||
{
|
||||
return (i + s) % s;
|
||||
}
|
||||
|
||||
const CMenu::SOption CMenu::_exitTo[3] = {
|
||||
{ "menu", L"System Menu" },
|
||||
{ "hbc", L"HBC" },
|
||||
{ "wiiu", L"Wii U Menu" },
|
||||
};
|
||||
|
||||
void CMenu::_hideConfig4(bool instant)
|
||||
{
|
||||
_hideConfigCommon(instant);
|
||||
|
||||
m_btnMgr.hide(m_config4LblPathManager, instant);
|
||||
m_btnMgr.hide(m_config4BtnPathManager, instant);
|
||||
m_btnMgr.hide(m_config4LblSaveFavMode, instant);
|
||||
m_btnMgr.hide(m_config4BtnSaveFavMode, instant);
|
||||
m_btnMgr.hide(m_config4LblHome, instant);
|
||||
m_btnMgr.hide(m_config4BtnHome, instant);
|
||||
m_btnMgr.hide(m_config4LblReturnTo, instant);
|
||||
m_btnMgr.hide(m_config4LblReturnToVal, instant);
|
||||
m_btnMgr.hide(m_config4BtnReturnToM, instant);
|
||||
m_btnMgr.hide(m_config4BtnReturnToP, instant);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_config4LblUser); ++i)
|
||||
if(m_config4LblUser[i] != -1)
|
||||
m_btnMgr.hide(m_config4LblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_showConfig4(void)
|
||||
{
|
||||
_showConfigCommon(m_config4Bg, 4);
|
||||
|
||||
m_btnMgr.show(m_config4LblPathManager);
|
||||
m_btnMgr.show(m_config4BtnPathManager);
|
||||
m_btnMgr.show(m_config4LblSaveFavMode);
|
||||
m_btnMgr.show(m_config4BtnSaveFavMode);
|
||||
m_btnMgr.show(m_config4LblHome);
|
||||
m_btnMgr.show(m_config4BtnHome);
|
||||
m_btnMgr.show(m_config4LblReturnTo);
|
||||
m_btnMgr.show(m_config4LblReturnToVal);
|
||||
m_btnMgr.show(m_config4BtnReturnToM);
|
||||
m_btnMgr.show(m_config4BtnReturnToP);
|
||||
|
||||
for(u32 i = 0; i < ARRAY_SIZE(m_config4LblUser); ++i)
|
||||
if(m_config4LblUser[i] != -1)
|
||||
m_btnMgr.show(m_config4LblUser[i]);
|
||||
|
||||
int i;
|
||||
i = min(max(0, m_cfg.getInt("GENERAL", "exit_to", 0)), (int)ARRAY_SIZE(CMenu::_exitTo) - 1);
|
||||
m_btnMgr.setText(m_config4BtnHome, _t(CMenu::_exitTo[i].id, CMenu::_exitTo[i].text));
|
||||
m_btnMgr.setText(m_config4BtnSaveFavMode, m_cfg.getBool("GENERAL", "save_favorites_mode") ? _t("on", L"On") : _t("off", L"Off"));
|
||||
|
||||
custom_titles.load(fmt("%s/" CTITLES_FILENAME, m_settingsDir.c_str()));
|
||||
|
||||
ChannelHandle.Init(m_loc.getString(m_curLanguage, "gametdb_code", "EN"));
|
||||
amountOfChannels = ChannelHandle.Count();
|
||||
wstringEx channelName = m_loc.getWString(m_curLanguage, "disabled", L"Disabled");
|
||||
const string ¤tChanId = m_cfg.getString("GENERAL", "returnto");
|
||||
currentChannelIndex = -1;
|
||||
if(!currentChanId.empty())
|
||||
{
|
||||
for(int i = 0; i < amountOfChannels; i++)
|
||||
{
|
||||
if(strncmp(currentChanId.c_str(), ChannelHandle.GetId(i), 4) == 0)
|
||||
{
|
||||
channelName = custom_titles.getWString("TITLES", currentChanId, ChannelHandle.GetName(i));
|
||||
currentChannelIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_btnMgr.setText(m_config4LblReturnToVal, channelName);
|
||||
}
|
||||
|
||||
int CMenu::_config4(void)
|
||||
{
|
||||
int change = CONFIG_PAGE_NO_CHANGE;
|
||||
bool curNANDemuView = NANDemuView;
|
||||
NANDemuView = false;
|
||||
_showConfig4();
|
||||
while(!m_exit)
|
||||
{
|
||||
change = _configCommon();
|
||||
if (change != CONFIG_PAGE_NO_CHANGE)
|
||||
break;
|
||||
if (BTN_A_PRESSED)
|
||||
{
|
||||
if (m_btnMgr.selected(m_config4BtnHome))
|
||||
{
|
||||
int exit_to = (int)loopNum(m_cfg.getUInt("GENERAL", "exit_to", 0) + 1, ARRAY_SIZE(CMenu::_exitTo));
|
||||
m_cfg.setInt("GENERAL", "exit_to", exit_to);
|
||||
Sys_ExitTo(exit_to);
|
||||
_showConfig4();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config4BtnSaveFavMode))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "save_favorites_mode", !m_cfg.getBool("GENERAL", "save_favorites_mode"));
|
||||
_showConfig4();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config4BtnPathManager))
|
||||
{
|
||||
_hideConfig4();
|
||||
_Paths();
|
||||
_showConfig4();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config4BtnReturnToP))
|
||||
{
|
||||
if(currentChannelIndex >= (amountOfChannels - 1))
|
||||
m_cfg.remove("GENERAL", "returnto");
|
||||
else
|
||||
m_cfg.setString("GENERAL", "returnto", ChannelHandle.GetId(currentChannelIndex + 1));
|
||||
_showConfig4();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_config4BtnReturnToM))
|
||||
{
|
||||
if(currentChannelIndex == -1)
|
||||
currentChannelIndex = amountOfChannels;
|
||||
if((currentChannelIndex - 1) == -1)
|
||||
m_cfg.remove("GENERAL", "returnto");
|
||||
else
|
||||
m_cfg.setString("GENERAL", "returnto", ChannelHandle.GetId(currentChannelIndex - 1));
|
||||
_showConfig4();
|
||||
}
|
||||
}
|
||||
}
|
||||
NANDemuView = curNANDemuView;
|
||||
_hideConfig4();
|
||||
if(custom_titles.loaded())
|
||||
custom_titles.unload();
|
||||
return change;
|
||||
}
|
||||
|
||||
void CMenu::_initConfig4Menu()
|
||||
{
|
||||
_addUserLabels(m_config4LblUser, ARRAY_SIZE(m_config4LblUser), "CONFIG4");
|
||||
m_config4Bg = _texture("CONFIG4/BG", "texture", theme.bg, false);
|
||||
|
||||
m_config4LblHome = _addLabel("CONFIG4/WIIMENU", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config4BtnHome = _addButton("CONFIG4/WIIMENU_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
|
||||
m_config4LblSaveFavMode = _addLabel("CONFIG4/SAVE_FAVMODE", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config4BtnSaveFavMode = _addButton("CONFIG4/SAVE_FAVMODE_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
|
||||
m_config4LblPathManager = _addLabel("CONFIG4/PATH_MANAGER", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config4BtnPathManager = _addButton("CONFIG4/PATH_MANAGER_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
||||
m_config4LblReturnTo = _addLabel("CONFIG4/RETURN_TO", theme.lblFont, L"", 20, 305, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config4LblReturnToVal = _addLabel("CONFIG4/RETURN_TO_BTN", theme.btnFont, L"", 468, 310, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config4BtnReturnToM = _addPicButton("CONFIG4/RETURN_TO_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48);
|
||||
m_config4BtnReturnToP = _addPicButton("CONFIG4/RETURN_TO_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48);
|
||||
//
|
||||
_setHideAnim(m_config4LblPathManager, "CONFIG4/PATH_MANAGER", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config4BtnPathManager, "CONFIG4/PATH_MANAGER_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config4LblSaveFavMode, "CONFIG4/SAVE_FAVMODE", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config4BtnSaveFavMode, "CONFIG4/SAVE_FAVMODE_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config4LblHome, "CONFIG4/WIIMENU", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config4BtnHome, "CONFIG4/WIIMENU_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config4LblReturnTo, "CONFIG4/RETURN_TO", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config4LblReturnToVal, "CONFIG4/RETURN_TO_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config4BtnReturnToM, "CONFIG4/RETURN_TO_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config4BtnReturnToP, "CONFIG4/RETURN_TO_PLUS", -50, 0, 1.f, 0.f);
|
||||
_hideConfig4(true);
|
||||
_textConfig4();
|
||||
}
|
||||
|
||||
void CMenu::_textConfig4(void)
|
||||
{
|
||||
m_btnMgr.setText(m_config4LblHome, _t("cfgc1", L"Exit To"));
|
||||
m_btnMgr.setText(m_config4LblSaveFavMode, _t("cfgd5", L"Save favorite mode state"));
|
||||
m_btnMgr.setText(m_config4LblPathManager, _t("cfgd4", L"Path Manager"));
|
||||
m_btnMgr.setText(m_config4BtnPathManager, _t("cfgc5", L"Go"));
|
||||
m_btnMgr.setText(m_config4LblReturnTo, _t("cfgg21", L"Return To Channel"));
|
||||
}
|
@ -1,468 +0,0 @@
|
||||
|
||||
#include "menu.hpp"
|
||||
|
||||
template <class T> static inline T loopNum(T i, T s)
|
||||
{
|
||||
return (i + s) % s;
|
||||
}
|
||||
|
||||
void CMenu::_hideConfig7(bool instant)
|
||||
{
|
||||
_hideConfigCommon(instant);
|
||||
|
||||
m_btnMgr.hide(m_config7Lbl1, instant);
|
||||
m_btnMgr.hide(m_config7Btn1, instant);
|
||||
m_btnMgr.hide(m_config7Lbl2, instant);
|
||||
m_btnMgr.hide(m_config7Btn2, instant);
|
||||
m_btnMgr.hide(m_config7Lbl3, instant);
|
||||
m_btnMgr.hide(m_config7Btn3, instant);
|
||||
m_btnMgr.hide(m_config7Lbl4, instant);
|
||||
m_btnMgr.hide(m_config7Btn4, instant);
|
||||
|
||||
m_btnMgr.hide(m_config7Lbl3Val, instant);
|
||||
m_btnMgr.hide(m_config7Btn3M, instant);
|
||||
m_btnMgr.hide(m_config7Btn3P, instant);
|
||||
|
||||
m_btnMgr.hide(m_config7Lbl4Val, instant);
|
||||
m_btnMgr.hide(m_config7Btn4M, instant);
|
||||
m_btnMgr.hide(m_config7Btn4P, instant);
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_config7LblUser); ++i)
|
||||
if(m_config7LblUser[i] != -1)
|
||||
m_btnMgr.hide(m_config7LblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_showConfig7(int curPage)
|
||||
{
|
||||
_showConfigCommon(m_config7Bg,curPage);
|
||||
|
||||
m_btnMgr.hide(m_config7Lbl1, true);
|
||||
m_btnMgr.hide(m_config7Btn1, true);
|
||||
m_btnMgr.hide(m_config7Lbl2, true);
|
||||
m_btnMgr.hide(m_config7Btn2, true);
|
||||
m_btnMgr.hide(m_config7Lbl3, true);
|
||||
m_btnMgr.hide(m_config7Btn3, true);
|
||||
m_btnMgr.hide(m_config7Lbl4, true);
|
||||
m_btnMgr.hide(m_config7Btn4, true);
|
||||
|
||||
m_btnMgr.hide(m_config7Lbl3Val, true);
|
||||
m_btnMgr.hide(m_config7Btn3M, true);
|
||||
m_btnMgr.hide(m_config7Btn3P, true);
|
||||
|
||||
m_btnMgr.hide(m_config7Lbl4Val, true);
|
||||
m_btnMgr.hide(m_config7Btn4M, true);
|
||||
m_btnMgr.hide(m_config7Btn4P, true);
|
||||
|
||||
_setBg(m_config7Bg, m_config7Bg);
|
||||
|
||||
for(u32 i = 0; i < ARRAY_SIZE(m_config7LblUser); ++i)
|
||||
if(m_config7LblUser[i] != -1)
|
||||
m_btnMgr.show(m_config7LblUser[i]);
|
||||
|
||||
m_btnMgr.show(m_config7Lbl1);
|
||||
m_btnMgr.show(m_config7Btn1);
|
||||
m_btnMgr.show(m_config7Lbl2);
|
||||
m_btnMgr.show(m_config7Btn2);
|
||||
if(curPage != 14)
|
||||
{
|
||||
m_btnMgr.show(m_config7Lbl3);
|
||||
m_btnMgr.show(m_config7Btn3);
|
||||
m_btnMgr.show(m_config7Lbl4);
|
||||
}
|
||||
|
||||
if(curPage == 7 || curPage == 11 || curPage == 12 || curPage == 13)
|
||||
m_btnMgr.show(m_config7Btn4);
|
||||
else if(curPage == 14)
|
||||
{
|
||||
m_btnMgr.show(m_config7Lbl3);
|
||||
m_btnMgr.show(m_config7Lbl3Val);
|
||||
m_btnMgr.show(m_config7Btn3M);
|
||||
m_btnMgr.show(m_config7Btn3P);
|
||||
}
|
||||
else if(curPage != 14)
|
||||
{
|
||||
m_btnMgr.show(m_config7Lbl4Val);
|
||||
m_btnMgr.show(m_config7Btn4M);
|
||||
m_btnMgr.show(m_config7Btn4P);
|
||||
}
|
||||
|
||||
if(curPage == 7)
|
||||
{
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("cfg701", L"Hide all source buttons"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "hideviews") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("cfg702", L"Hide GameCube button"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool(GC_DOMAIN, "disable") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("cfg703", L"Hide channels button"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool(CHANNEL_DOMAIN, "disable") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl4, _t("cfg704", L"Hide plugins button"));
|
||||
m_btnMgr.setText(m_config7Btn4, m_cfg.getBool(PLUGIN_DOMAIN, "disable") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(curPage == 8)
|
||||
{
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("cfg705", L"Show banner in game settings"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "banner_in_settings") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("cfg706", L"Enable fanart"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("FANART", "enable_fanart") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("cfg707", L"Fanart default loop"));
|
||||
m_btnMgr.setText(m_config7Btn3, !m_cfg.getBool("FANART", "show_cover_after_animation") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl4, _t("cfg708", L"Fanart default ending delay"));
|
||||
m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("FANART", "delay_after_animation", 200)));
|
||||
}
|
||||
else if(curPage == 9)
|
||||
{
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("cfg709", L"Rumble"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "rumble") ? _t("on", L"On") : _t("off", L"Off"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("cfg710", L"Wiimote gestures"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("GENERAL", "wiimote_gestures") ? _t("on", L"On") : _t("off", L"Off"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("cfg711", L"Screensaver"));
|
||||
m_btnMgr.setText(m_config7Btn3, !m_cfg.getBool("GENERAL", "screensaver_disabled") ? _t("on", L"On") : _t("off", L"Off"));
|
||||
m_btnMgr.setText(m_config7Lbl4, _t("cfg712", L"Screensaver idle seconds"));
|
||||
m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("GENERAL", "screensaver_idle_seconds", 60)));// inc by 30
|
||||
}
|
||||
else if(curPage == 10)
|
||||
{
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("cfg728", L"Upsample music to 48khz"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("general", "resample_to_48khz", true) ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("cfg714", L"Display music title"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("GENERAL", "display_music_info") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("cfg715", L"Randomize music"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool("GENERAL", "randomize_music") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl4, _t("cfg716", L"Music fade rate"));
|
||||
m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("GENERAL", "music_fade_rate", 8)));
|
||||
}
|
||||
else if(curPage == 11)
|
||||
{
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("cfg717", L"Random game boot or select"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "random_select") ? _t("select", L"Select") : _t("boot", L"Boot"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("cfg725", L"Shutdown to idle standby"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("general", "idle_standby", false) ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("cfg720", L"Play GC banner sound"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool(GC_DOMAIN, "play_banner_sound") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl4, _t("cfg721", L"Play GC default sound"));
|
||||
m_btnMgr.setText(m_config7Btn4, m_cfg.getBool(GC_DOMAIN, "play_default_sound") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(curPage == 12)
|
||||
{
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("cfg722", L"Homebrew settings"));
|
||||
m_btnMgr.setText(m_config7Btn1, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("cfg723", L"Sourceflow settings"));
|
||||
m_btnMgr.setText(m_config7Btn2, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("cfg718", L"Source Menu on start"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool("GENERAL", "source_on_start") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl4, _t("cfg727", L"Use Plugin Database Titles"));
|
||||
m_btnMgr.setText(m_config7Btn4, m_cfg.getBool(PLUGIN_DOMAIN, "database_titles", true) ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(curPage == 13)
|
||||
{
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("cfgg49", L"480p Pixel Patch"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool(WII_DOMAIN, "fix480p", false) ? _t("on", L"On") : _t("off", L"Off"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("cfg726", L"Covers Box Mode"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("general", "box_mode", false) ? _t("on", L"On") : _t("off", L"Off"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("cfg713", L"Use HQ covers"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool("GENERAL", "cover_use_hq") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl4, _t("cfg724", L"Lock coverflow layouts"));
|
||||
m_btnMgr.setText(m_config7Btn4, m_cfg.getBool("general", "cf_locked") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else // page 14
|
||||
{
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("cfg729", L"Use system proxy settings"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("PROXY", "proxy_use_system") ? _t("on", L"On") : _t("off", L"Off"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("cfg730", L"Always show main icons"));
|
||||
m_btnMgr.setText(m_config7Btn2, !m_cfg.getBool("GENERAL", "auto_hide_icons", true) ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("cfgg61", L"Deflicker Filter"));
|
||||
int i = min(max(0, m_cfg.getInt("GENERAL", "deflicker_wii", 0)), (int)ARRAY_SIZE(CMenu::_GlobalDeflickerOptions) - 1);
|
||||
m_btnMgr.setText(m_config7Lbl3Val, _t(CMenu::_GlobalDeflickerOptions[i].id, CMenu::_GlobalDeflickerOptions[i].text));
|
||||
}
|
||||
}
|
||||
|
||||
int CMenu::_config7(int curPage)
|
||||
{
|
||||
bool rand_music = m_cfg.getBool("GENERAL", "randomize_music");
|
||||
bool hq_covers = m_cfg.getBool("GENERAL", "cover_use_hq");
|
||||
bool box_mode = m_cfg.getBool("GENERAL", "box_mode", true);
|
||||
bool db_titles = m_cfg.getBool(PLUGIN_DOMAIN, "database_titles", true);
|
||||
int change = CONFIG_PAGE_NO_CHANGE;
|
||||
_showConfig7(curPage);
|
||||
|
||||
while(!m_exit)
|
||||
{
|
||||
change = _configCommon();
|
||||
if(change != CONFIG_PAGE_NO_CHANGE)
|
||||
break;
|
||||
if(BTN_A_PRESSED)
|
||||
{
|
||||
if(curPage == 7)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "hideviews", !m_cfg.getBool("GENERAL", "hideviews"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "hideviews") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
m_cfg.setBool(GC_DOMAIN, "disable", !m_cfg.getBool(GC_DOMAIN, "disable"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool(GC_DOMAIN, "disable") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3))
|
||||
{
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "disable", !m_cfg.getBool(CHANNEL_DOMAIN, "disable"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool(CHANNEL_DOMAIN, "disable") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn4))
|
||||
{
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "disable", !m_cfg.getBool(PLUGIN_DOMAIN, "disable"));
|
||||
m_btnMgr.setText(m_config7Btn4, m_cfg.getBool(PLUGIN_DOMAIN, "disable") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
}
|
||||
if(curPage == 8)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "banner_in_settings", !m_cfg.getBool("GENERAL", "banner_in_settings"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "banner_in_settings") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_bnr_settings = m_cfg.getBool("GENERAL", "banner_in_settings");
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
m_cfg.setBool("FANART", "enable_fanart", !m_cfg.getBool("FANART", "enable_fanart"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("FANART", "enable_fanart") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3))
|
||||
{
|
||||
m_cfg.setBool("FANART", "show_cover_after_animation", !m_cfg.getBool("FANART", "show_cover_after_animation"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool("FANART", "show_cover_after_animation") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn4P) || m_btnMgr.selected(m_config7Btn4M))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config7Btn4P) ? 1 : -1;
|
||||
int val = m_cfg.getInt("FANART", "delay_after_animation") + direction;
|
||||
if(val >= 0 && val < 360)
|
||||
m_cfg.setInt("FANART", "delay_after_animation", val);
|
||||
m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("FANART", "delay_after_animation")));
|
||||
}
|
||||
}
|
||||
if(curPage == 9)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "rumble", !m_cfg.getBool("GENERAL", "rumble"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "rumble") ? _t("on", L"On") : _t("off", L"Off"));
|
||||
m_btnMgr.setRumble(m_cfg.getBool("GENERAL", "rumble"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "wiimote_gestures", !m_cfg.getBool("GENERAL", "wiimote_gestures"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("GENERAL", "wiimote_gestures") ? _t("on", L"On") : _t("off", L"Off"));
|
||||
enable_wmote_roll = m_cfg.getBool("GENERAL", "wiimote_gestures");
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "screensaver_disabled", !m_cfg.getBool("GENERAL", "screensaver_disabled"));
|
||||
m_btnMgr.setText(m_config7Btn3, !m_cfg.getBool("GENERAL", "screensaver_disabled") ? _t("on", L"On") : _t("off", L"Off"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn4P) || m_btnMgr.selected(m_config7Btn4M))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config7Btn4P) ? 30 : -30;
|
||||
int val = m_cfg.getInt("GENERAL", "screensaver_idle_seconds") + direction;
|
||||
if(val >= 0 && val < 361)
|
||||
m_cfg.setInt("GENERAL", "screensaver_idle_seconds", val);
|
||||
m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("GENERAL", "screensaver_idle_seconds")));
|
||||
}
|
||||
}
|
||||
if(curPage == 10)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
{
|
||||
bool val = !m_cfg.getBool("general", "resample_to_48khz");
|
||||
m_cfg.setBool("general", "resample_to_48khz", val);
|
||||
m_btnMgr.setText(m_config7Btn1, val ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
MusicPlayer.SetResampleSetting(val);
|
||||
MusicPlayer.ReLoadCurrentFile();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "display_music_info", !m_cfg.getBool("GENERAL", "display_music_info"));
|
||||
m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("GENERAL", "display_music_info") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_music_info = m_cfg.getBool("GENERAL", "display_music_info");
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "randomize_music", !m_cfg.getBool("GENERAL", "randomize_music"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool("GENERAL", "randomize_music") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn4P) || m_btnMgr.selected(m_config7Btn4M))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config7Btn4P) ? 1 : -1;
|
||||
int val = m_cfg.getInt("GENERAL", "music_fade_rate") + direction;
|
||||
if(val >= 0 && val < 30)
|
||||
m_cfg.setInt("GENERAL", "music_fade_rate", val);
|
||||
m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("GENERAL", "music_fade_rate")));
|
||||
MusicPlayer.SetFadeRate(m_cfg.getInt("GENERAL", "music_fade_rate"));
|
||||
}
|
||||
}
|
||||
if(curPage == 11)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "random_select", !m_cfg.getBool("GENERAL", "random_select"));
|
||||
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "random_select") ? _t("select", L"Select") : _t("boot", L"Boot"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
bool val = !m_cfg.getBool("general", "idle_standby");
|
||||
m_cfg.setBool("general", "idle_standby", val);
|
||||
m_btnMgr.setText(m_config7Btn2, val ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3))
|
||||
{
|
||||
m_cfg.setBool(GC_DOMAIN, "play_banner_sound", !m_cfg.getBool(GC_DOMAIN, "play_banner_sound"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool(GC_DOMAIN, "play_banner_sound") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_gc_play_banner_sound = m_cfg.getBool(GC_DOMAIN, "play_banner_sound", true);
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn4))
|
||||
{
|
||||
m_cfg.setBool(GC_DOMAIN, "play_default_sound", !m_cfg.getBool(GC_DOMAIN, "play_default_sound"));
|
||||
m_btnMgr.setText(m_config7Btn4, m_cfg.getBool(GC_DOMAIN, "play_default_sound") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
m_gc_play_default_sound = m_cfg.getBool(GC_DOMAIN, "play_default_sound", true);
|
||||
}
|
||||
}
|
||||
if(curPage == 12)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
{
|
||||
_hideConfig7();
|
||||
_CfgHB();
|
||||
_showConfig7(12);
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
_hideConfig7();
|
||||
_CfgSrc();
|
||||
_showConfig7(12);
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "source_on_start", !m_cfg.getBool("GENERAL", "source_on_start"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool("GENERAL", "source_on_start") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn4))
|
||||
{
|
||||
bool val = !m_cfg.getBool(PLUGIN_DOMAIN, "database_titles");
|
||||
m_cfg.setBool(PLUGIN_DOMAIN, "database_titles", val);
|
||||
m_btnMgr.setText(m_config7Btn4, val ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
}
|
||||
if(curPage == 13)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
{
|
||||
bool val = !m_cfg.getBool(WII_DOMAIN, "fix480p");
|
||||
m_cfg.setBool(WII_DOMAIN, "fix480p", val);
|
||||
m_btnMgr.setText(m_config7Btn1, val ? _t("on", L"On") : _t("off", L"Off"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
bool val = !m_cfg.getBool("general", "box_mode");
|
||||
m_cfg.setBool("general", "box_mode", val);
|
||||
m_btnMgr.setText(m_config7Btn2, val ? _t("on", L"On") : _t("off", L"Off"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3))
|
||||
{
|
||||
m_cfg.setBool("GENERAL", "cover_use_hq", !m_cfg.getBool("GENERAL", "cover_use_hq"));
|
||||
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool("GENERAL", "cover_use_hq") ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn4))
|
||||
{
|
||||
bool val = !m_cfg.getBool("general", "cf_locked");
|
||||
m_cfg.setBool("general", "cf_locked", val);
|
||||
m_btnMgr.setText(m_config7Btn4, val ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
CFLocked = val;
|
||||
}
|
||||
}
|
||||
if(curPage == 14)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
{
|
||||
bool val = !m_cfg.getBool("PROXY", "proxy_use_system");
|
||||
m_cfg.setBool("PROXY", "proxy_use_system", val);
|
||||
mainMenu.proxyUseSystem = val;
|
||||
m_btnMgr.setText(m_config7Btn1, val ? _t("on", L"On") : _t("off", L"Off"));
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
{
|
||||
bool val = !m_cfg.getBool("GENERAL", "auto_hide_icons");
|
||||
m_cfg.setBool("GENERAL", "auto_hide_icons", val);
|
||||
m_btnMgr.setText(m_config7Btn2, !val ? _t("yes", L"Yes") : _t("no", L"No"));
|
||||
Auto_hide_icons = val;
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3P) || m_btnMgr.selected(m_config7Btn3M))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_config7Btn3P) ? 1 : -1;
|
||||
m_cfg.setInt("GENERAL", "deflicker_wii", loopNum(m_cfg.getUInt("GENERAL", "deflicker_wii") + direction, ARRAY_SIZE(CMenu::_GlobalDeflickerOptions)));
|
||||
int val = m_cfg.getInt("GENERAL", "deflicker_wii");
|
||||
m_btnMgr.setText(m_config7Lbl3Val, _t(CMenu::_GlobalDeflickerOptions[val].id, CMenu::_GlobalDeflickerOptions[val].text));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(rand_music != m_cfg.getBool("GENERAL", "randomize_music"))
|
||||
MusicPlayer.Init(m_cfg, m_musicDir, fmt("%s/music", m_themeDataDir.c_str()));
|
||||
if(db_titles != m_cfg.getBool(PLUGIN_DOMAIN, "database_titles"))
|
||||
{
|
||||
fsop_deleteFolder(m_listCacheDir.c_str());
|
||||
fsop_MakeFolder(m_listCacheDir.c_str());
|
||||
m_refreshGameList = true;
|
||||
}
|
||||
if(!m_refreshGameList && (hq_covers != m_cfg.getBool("GENERAL", "cover_use_hq") || box_mode != m_cfg.getBool("general", "box_mode")))
|
||||
_initCF();
|
||||
_hideConfig7();
|
||||
return change;
|
||||
}
|
||||
|
||||
void CMenu::_initConfig7Menu()
|
||||
{
|
||||
_addUserLabels(m_config7LblUser, ARRAY_SIZE(m_config7LblUser), "CONFIG7");
|
||||
m_config7Bg = _texture("CONFIG7/BG", "texture", theme.bg, false);
|
||||
|
||||
m_config7Lbl1 = _addLabel("CONFIG7/LINE1", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config7Btn1 = _addButton("CONFIG7/LINE1_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
|
||||
m_config7Lbl2 = _addLabel("CONFIG7/LINE2", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config7Btn2 = _addButton("CONFIG7/LINE2_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
|
||||
m_config7Lbl3 = _addLabel("CONFIG7/LINE3", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config7Btn3 = _addButton("CONFIG7/LINE3_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
||||
m_config7Lbl4 = _addLabel("CONFIG7/LINE4", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_config7Btn4 = _addButton("CONFIG7/LINE4_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
|
||||
|
||||
m_config7Lbl3Val = _addLabel("CONFIG7/LINE3_VAL", theme.btnFont, L"", 468, 250, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config7Btn3M = _addPicButton("CONFIG7/LINE3_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 250, 48, 48);
|
||||
m_config7Btn3P = _addPicButton("CONFIG7/LINE3_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 250, 48, 48);
|
||||
|
||||
m_config7Lbl4Val = _addLabel("CONFIG7/LINE4_VAL", theme.btnFont, L"", 468, 310, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_config7Btn4M = _addPicButton("CONFIG7/LINE4_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48);
|
||||
m_config7Btn4P = _addPicButton("CONFIG7/LINE4_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48);
|
||||
|
||||
_setHideAnim(m_config7Lbl1, "CONFIG7/LINE1", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config7Btn1, "CONFIG7/LINE1_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config7Lbl2, "CONFIG7/LINE2", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config7Btn2, "CONFIG7/LINE2_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config7Lbl3, "CONFIG7/LINE3", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config7Btn3, "CONFIG7/LINE3_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config7Lbl4, "CONFIG7/LINE4", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_config7Btn4, "CONFIG7/LINE4_BTN", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_config7Lbl3Val, "CONFIG7/LINE3_VAL", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config7Btn3M, "CONFIG7/LINE3_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config7Btn3P, "CONFIG7/LINE3_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_config7Lbl4Val, "CONFIG7/LINE4_VAL", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config7Btn4M, "CONFIG7/LINE4_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_config7Btn4P, "CONFIG7/LINE4_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_hideConfig7(true);
|
||||
}
|
||||
|
||||
/*
|
||||
void CMenu::_textConfig7(void)
|
||||
{
|
||||
}
|
||||
*/
|
@ -1,229 +0,0 @@
|
||||
|
||||
#include <dirent.h>
|
||||
#include <algorithm>
|
||||
#include "menu.hpp"
|
||||
|
||||
template <class T> static inline T loopNum(T i, T s)
|
||||
{
|
||||
return (i + s) % s;
|
||||
}
|
||||
|
||||
vector<string> languages_available;
|
||||
void AddLanguage(char *Path)
|
||||
{
|
||||
char lng[32];
|
||||
memset(lng, 0, 32);
|
||||
char *lang_chr = strrchr(Path, '/')+1;
|
||||
memcpy(lng, lang_chr, min(31u, (u32)(strrchr(lang_chr, '.')-lang_chr)));
|
||||
languages_available.push_back(lng);
|
||||
}
|
||||
|
||||
void CMenu::_hideConfigAdv(bool instant)
|
||||
{
|
||||
_hideConfigCommon(instant);
|
||||
|
||||
m_btnMgr.hide(m_configAdvLblBootChange, instant);
|
||||
m_btnMgr.hide(m_configAdvBtnBootChange, instant);
|
||||
m_btnMgr.hide(m_configAdvLblTheme, instant);
|
||||
m_btnMgr.hide(m_configAdvLblCurTheme, instant);
|
||||
m_btnMgr.hide(m_configAdvBtnCurThemeM, instant);
|
||||
m_btnMgr.hide(m_configAdvBtnCurThemeP, instant);
|
||||
m_btnMgr.hide(m_configAdvLblLanguage, instant);
|
||||
m_btnMgr.hide(m_configAdvLblCurLanguage, instant);
|
||||
m_btnMgr.hide(m_configAdvBtnCurLanguageM, instant);
|
||||
m_btnMgr.hide(m_configAdvBtnCurLanguageP, instant);
|
||||
m_btnMgr.hide(m_configAdvLblCFTheme, instant);
|
||||
m_btnMgr.hide(m_configAdvBtnCFTheme, instant);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configAdvLblUser); ++i)
|
||||
if(m_configAdvLblUser[i] != -1)
|
||||
m_btnMgr.hide(m_configAdvLblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_showConfigAdv(void)
|
||||
{
|
||||
_showConfigCommon(m_configAdvBg, 2);
|
||||
|
||||
m_btnMgr.show(m_configAdvLblCurTheme);
|
||||
m_btnMgr.show(m_configAdvBtnCurThemeM);
|
||||
m_btnMgr.show(m_configAdvBtnCurThemeP);
|
||||
m_btnMgr.show(m_configAdvLblTheme);
|
||||
|
||||
m_btnMgr.show(m_configAdvLblBootChange);
|
||||
m_btnMgr.show(m_configAdvBtnBootChange);
|
||||
|
||||
m_btnMgr.show(m_configAdvLblLanguage);
|
||||
m_btnMgr.show(m_configAdvLblCurLanguage);
|
||||
m_btnMgr.show(m_configAdvBtnCurLanguageM);
|
||||
m_btnMgr.show(m_configAdvBtnCurLanguageP);
|
||||
|
||||
m_btnMgr.show(m_configAdvLblCFTheme);
|
||||
m_btnMgr.show(m_configAdvBtnCFTheme);
|
||||
|
||||
for(u32 i = 0; i < ARRAY_SIZE(m_configAdvLblUser); ++i)
|
||||
if(m_configAdvLblUser[i] != -1)
|
||||
m_btnMgr.show(m_configAdvLblUser[i]);
|
||||
|
||||
m_btnMgr.setText(m_configAdvLblCurTheme, m_themeName);
|
||||
m_btnMgr.setText(m_configAdvLblCurLanguage, m_curLanguage);
|
||||
}
|
||||
|
||||
static void listThemes(const char * path, vector<string> &themes)
|
||||
{
|
||||
DIR *d;
|
||||
struct dirent *dir;
|
||||
bool def = false;
|
||||
|
||||
themes.clear();
|
||||
d = opendir(path);
|
||||
if (d != 0)
|
||||
{
|
||||
dir = readdir(d);
|
||||
while (dir != 0)
|
||||
{
|
||||
string fileName = dir->d_name;
|
||||
def = def || (upperCase(fileName) == "DEFAULT.INI");
|
||||
if (fileName.size() > 4 && fileName.substr(fileName.size() - 4, 4) == ".ini")
|
||||
themes.push_back(fileName.substr(0, fileName.size() - 4));
|
||||
dir = readdir(d);
|
||||
}
|
||||
closedir(d);
|
||||
}
|
||||
if (!def)
|
||||
themes.push_back("Default");
|
||||
sort(themes.begin(), themes.end());
|
||||
}
|
||||
|
||||
int CMenu::_configAdv(void)
|
||||
{
|
||||
int change = CONFIG_PAGE_NO_CHANGE;
|
||||
|
||||
vector<string> themes;
|
||||
listThemes(m_themeDir.c_str(), themes);
|
||||
u32 curTheme = 0;
|
||||
for (u32 i = 0; i < themes.size(); ++i)
|
||||
if (themes[i] == m_themeName)
|
||||
{
|
||||
curTheme = i;
|
||||
break;
|
||||
}
|
||||
|
||||
languages_available.clear();
|
||||
languages_available.push_back("Default");
|
||||
GetFiles(m_languagesDir.c_str(), stringToVector(".ini", '|'), AddLanguage, false, 0);
|
||||
sort(languages_available.begin(), languages_available.end());
|
||||
|
||||
u32 curLang = 0;
|
||||
for(u32 i = 0; i < languages_available.size(); ++i)
|
||||
{
|
||||
if(m_curLanguage == languages_available[i])
|
||||
{
|
||||
curLang = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
string prevLanguage = m_curLanguage;
|
||||
|
||||
_showConfigAdv();
|
||||
while(!m_exit)
|
||||
{
|
||||
change = _configCommon();
|
||||
if (change != CONFIG_PAGE_NO_CHANGE)
|
||||
break;
|
||||
if (BTN_A_PRESSED)
|
||||
{
|
||||
if(m_btnMgr.selected(m_configAdvBtnBootChange))
|
||||
{
|
||||
_hideConfigAdv();
|
||||
_Boot();
|
||||
_showConfigAdv();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_configAdvBtnCurThemeP) || m_btnMgr.selected(m_configAdvBtnCurThemeM))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_configAdvBtnCurThemeP) ? 1 : -1;
|
||||
curTheme = loopNum(curTheme + direction, (u32)themes.size());
|
||||
m_themeName = themes[curTheme];
|
||||
m_cfg.setString("GENERAL", "theme", m_themeName);
|
||||
_showConfigAdv();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_configAdvBtnCurLanguageP) || m_btnMgr.selected(m_configAdvBtnCurLanguageM))
|
||||
{
|
||||
s8 direction = m_btnMgr.selected(m_configAdvBtnCurLanguageP) ? 1 : -1;
|
||||
curLang = loopNum(curLang + direction, (u32)languages_available.size());
|
||||
m_curLanguage = languages_available[curLang];
|
||||
if(!m_loc.load(fmt("%s/%s.ini", m_languagesDir.c_str(), m_curLanguage.c_str())))
|
||||
{
|
||||
m_curLanguage = "Default";
|
||||
m_cfg.setString("GENERAL", "language", m_curLanguage);
|
||||
m_loc.unload();
|
||||
}
|
||||
else
|
||||
m_cfg.setString("GENERAL", "language", m_curLanguage);
|
||||
_updateText();
|
||||
_showConfigAdv();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_configAdvBtnCFTheme))
|
||||
{
|
||||
m_refreshGameList = true;
|
||||
_hideConfigAdv();
|
||||
_cfTheme();
|
||||
_showConfigAdv();
|
||||
}
|
||||
}
|
||||
}
|
||||
_hideConfigAdv();
|
||||
if(m_curLanguage != prevLanguage)
|
||||
{
|
||||
m_cacheList.Init(m_settingsDir.c_str(), m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str(), m_pluginDataDir.c_str(),
|
||||
m_cfg.getString(CONFIG_FILENAME_SKIP_DOMAIN,CONFIG_FILENAME_SKIP_KEY,CONFIG_FILENAME_SKIP_DEFAULT));
|
||||
fsop_deleteFolder(m_listCacheDir.c_str());// delete cache lists folder and remake it so all lists update.
|
||||
fsop_MakeFolder(m_listCacheDir.c_str());
|
||||
m_refreshGameList = true;
|
||||
}
|
||||
|
||||
return change;
|
||||
}
|
||||
|
||||
void CMenu::_initConfigAdvMenu()
|
||||
{
|
||||
_addUserLabels(m_configAdvLblUser, ARRAY_SIZE(m_configAdvLblUser), "CONFIG_ADV");
|
||||
m_configAdvBg = _texture("CONFIG_ADV/BG", "texture", theme.bg, false);
|
||||
|
||||
m_configAdvLblTheme = _addLabel("CONFIG_ADV/THEME", theme.lblFont, L"", 20, 125, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configAdvLblCurTheme = _addLabel("CONFIG_ADV/THEME_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configAdvBtnCurThemeM = _addPicButton("CONFIG_ADV/THEME_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
|
||||
m_configAdvBtnCurThemeP = _addPicButton("CONFIG_ADV/THEME_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
|
||||
m_configAdvLblLanguage = _addLabel("CONFIG_ADV/LANGUAGE", theme.lblFont, L"", 20, 185, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configAdvLblCurLanguage = _addLabel("CONFIG_ADV/LANGUAGE_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configAdvBtnCurLanguageM = _addPicButton("CONFIG_ADV/LANGUAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
|
||||
m_configAdvBtnCurLanguageP = _addPicButton("CONFIG_ADV/LANGUAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
|
||||
m_configAdvLblCFTheme = _addLabel("CONFIG_ADV/CUSTOMIZE_CF", theme.lblFont, L"", 20, 245, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configAdvBtnCFTheme = _addButton("CONFIG_ADV/CUSTOMIZE_CF_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
||||
m_configAdvLblBootChange = _addLabel("CONFIG_ADV/BOOT_CHANGE", theme.lblFont, L"", 20, 305, 290, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configAdvBtnBootChange = _addButton("CONFIG_ADV/BOOT_CHANGE_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
|
||||
|
||||
_setHideAnim(m_configAdvLblTheme, "CONFIG_ADV/THEME", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configAdvLblCurTheme, "CONFIG_ADV/THEME_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configAdvBtnCurThemeM, "CONFIG_ADV/THEME_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configAdvBtnCurThemeP, "CONFIG_ADV/THEME_PLUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configAdvLblLanguage, "CONFIG_ADV/LANGUAGE", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configAdvLblCurLanguage, "CONFIG_ADV/LANGUAGE_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configAdvBtnCurLanguageM, "CONFIG_ADV/LANGUAGE_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configAdvBtnCurLanguageP, "CONFIG_ADV/LANGUAGE_PLUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configAdvLblCFTheme, "CONFIG_ADV/CUSTOMIZE_CF", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configAdvBtnCFTheme, "CONFIG_ADV/CUSTOMIZE_CF_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configAdvLblBootChange, "CONFIG_ADV/BOOT_CHANGE", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configAdvBtnBootChange, "CONFIG_ADV/BOOT_CHANGE_BTN", -50, 0, 1.f, 0.f);
|
||||
_hideConfigAdv(true);
|
||||
_textConfigAdv();
|
||||
}
|
||||
|
||||
void CMenu::_textConfigAdv(void)
|
||||
{
|
||||
m_btnMgr.setText(m_configAdvLblTheme, _t("cfga7", L"Theme"));
|
||||
m_btnMgr.setText(m_configAdvLblLanguage, _t("cfgc9", L"WiiFlow Language"));// manage wiiflow languages
|
||||
//m_btnMgr.setText(m_configAdvBtnLanguage, _t("cfgc5", L"Go"));
|
||||
m_btnMgr.setText(m_configAdvLblCFTheme, _t("cfgc4", L"Adjust Coverflow"));
|
||||
m_btnMgr.setText(m_configAdvBtnCFTheme, _t("cfgc5", L"Go"));
|
||||
m_btnMgr.setText(m_configAdvLblBootChange, _t("cfgc8", L"Startup Settings"));
|
||||
m_btnMgr.setText(m_configAdvBtnBootChange, _t("cfgc5", L"Go"));
|
||||
}
|
1143
source/menu/menu_config_main.cpp
Normal file
1143
source/menu/menu_config_main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,154 +0,0 @@
|
||||
|
||||
#include "menu.hpp"
|
||||
|
||||
void CMenu::_hideConfigScreen(bool instant)
|
||||
{
|
||||
_hideConfigCommon(instant);
|
||||
|
||||
m_btnMgr.hide(m_configScreenLblTVHeight, instant);
|
||||
m_btnMgr.hide(m_configScreenLblTVHeightVal, instant);
|
||||
m_btnMgr.hide(m_configScreenBtnTVHeightP, instant);
|
||||
m_btnMgr.hide(m_configScreenBtnTVHeightM, instant);
|
||||
m_btnMgr.hide(m_configScreenLblTVWidth, instant);
|
||||
m_btnMgr.hide(m_configScreenLblTVWidthVal, instant);
|
||||
m_btnMgr.hide(m_configScreenBtnTVWidthP, instant);
|
||||
m_btnMgr.hide(m_configScreenBtnTVWidthM, instant);
|
||||
m_btnMgr.hide(m_configScreenLblTVX, instant);
|
||||
m_btnMgr.hide(m_configScreenLblTVXVal, instant);
|
||||
m_btnMgr.hide(m_configScreenBtnTVXM, instant);
|
||||
m_btnMgr.hide(m_configScreenBtnTVXP, instant);
|
||||
m_btnMgr.hide(m_configScreenLblTVY, instant);
|
||||
m_btnMgr.hide(m_configScreenLblTVYVal, instant);
|
||||
m_btnMgr.hide(m_configScreenBtnTVYM, instant);
|
||||
m_btnMgr.hide(m_configScreenBtnTVYP, instant);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configScreenLblUser); ++i)
|
||||
if(m_configScreenLblUser[i] != -1)
|
||||
m_btnMgr.hide(m_configScreenLblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_showConfigScreen(void)
|
||||
{
|
||||
_showConfigCommon(m_configScreenBg, 6);
|
||||
|
||||
m_btnMgr.show(m_configScreenLblTVHeight);
|
||||
m_btnMgr.show(m_configScreenLblTVHeightVal);
|
||||
m_btnMgr.show(m_configScreenBtnTVHeightP);
|
||||
m_btnMgr.show(m_configScreenBtnTVHeightM);
|
||||
m_btnMgr.show(m_configScreenLblTVWidth);
|
||||
m_btnMgr.show(m_configScreenLblTVWidthVal);
|
||||
m_btnMgr.show(m_configScreenBtnTVWidthP);
|
||||
m_btnMgr.show(m_configScreenBtnTVWidthM);
|
||||
m_btnMgr.show(m_configScreenLblTVX);
|
||||
m_btnMgr.show(m_configScreenLblTVXVal);
|
||||
m_btnMgr.show(m_configScreenBtnTVXM);
|
||||
m_btnMgr.show(m_configScreenBtnTVXP);
|
||||
m_btnMgr.show(m_configScreenLblTVY);
|
||||
m_btnMgr.show(m_configScreenLblTVYVal);
|
||||
m_btnMgr.show(m_configScreenBtnTVYM);
|
||||
m_btnMgr.show(m_configScreenBtnTVYP);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configScreenLblUser); ++i)
|
||||
if(m_configScreenLblUser[i] != -1)
|
||||
m_btnMgr.show(m_configScreenLblUser[i]);
|
||||
|
||||
m_btnMgr.setText(m_configScreenLblTVWidthVal, wfmt(L"%i", 640 * 640 / max(1, m_cfg.getInt("GENERAL", "tv_width", 640))));
|
||||
m_btnMgr.setText(m_configScreenLblTVHeightVal, wfmt(L"%i", 480 * 480 / max(1, m_cfg.getInt("GENERAL", "tv_height", 480))));
|
||||
m_btnMgr.setText(m_configScreenLblTVXVal, wfmt(L"%i", -m_cfg.getInt("GENERAL", "tv_x", 0)));
|
||||
m_btnMgr.setText(m_configScreenLblTVYVal, wfmt(L"%i", m_cfg.getInt("GENERAL", "tv_y", 0)));
|
||||
}
|
||||
|
||||
int CMenu::_configScreen(void)
|
||||
{
|
||||
int change = CONFIG_PAGE_NO_CHANGE;
|
||||
SetupInput();
|
||||
|
||||
_showConfigScreen();
|
||||
while(!m_exit)
|
||||
{
|
||||
change = _configCommon();
|
||||
if (change != CONFIG_PAGE_NO_CHANGE)
|
||||
break;
|
||||
if (BTN_A_REPEAT || BTN_A_PRESSED)
|
||||
{
|
||||
if (m_btnMgr.selected(m_configScreenBtnTVWidthP) || m_btnMgr.selected(m_configScreenBtnTVWidthM)
|
||||
|| m_btnMgr.selected(m_configScreenBtnTVHeightP) || m_btnMgr.selected(m_configScreenBtnTVHeightM)
|
||||
|| m_btnMgr.selected(m_configScreenBtnTVXP) || m_btnMgr.selected(m_configScreenBtnTVXM)
|
||||
|| m_btnMgr.selected(m_configScreenBtnTVYP) || m_btnMgr.selected(m_configScreenBtnTVYM))
|
||||
{
|
||||
int step = 0;
|
||||
if (m_btnMgr.selected(m_configScreenBtnTVWidthM) || m_btnMgr.selected(m_configScreenBtnTVHeightM))
|
||||
step = 2;
|
||||
else if (m_btnMgr.selected(m_configScreenBtnTVWidthP) || m_btnMgr.selected(m_configScreenBtnTVHeightP))
|
||||
step = -2;
|
||||
else if (m_btnMgr.selected(m_configScreenBtnTVXP) || m_btnMgr.selected(m_configScreenBtnTVYM))
|
||||
step = -1;
|
||||
else if (m_btnMgr.selected(m_configScreenBtnTVXM) || m_btnMgr.selected(m_configScreenBtnTVYP))
|
||||
step = 1;
|
||||
if (m_btnMgr.selected(m_configScreenBtnTVWidthM) || m_btnMgr.selected(m_configScreenBtnTVWidthP))
|
||||
m_cfg.setInt("GENERAL", "tv_width", min(max(512, m_cfg.getInt("GENERAL", "tv_width", 640) + step), 800));
|
||||
else if (m_btnMgr.selected(m_configScreenBtnTVHeightM) || m_btnMgr.selected(m_configScreenBtnTVHeightP))
|
||||
m_cfg.setInt("GENERAL", "tv_height", min(max(384, m_cfg.getInt("GENERAL", "tv_height", 480) + step), 600));
|
||||
else if (m_btnMgr.selected(m_configScreenBtnTVXP) || m_btnMgr.selected(m_configScreenBtnTVXM))
|
||||
m_cfg.setInt("GENERAL", "tv_x", min(max(-50, m_cfg.getInt("GENERAL", "tv_x", 0) + step), 50));
|
||||
else if (m_btnMgr.selected(m_configScreenBtnTVYP) || m_btnMgr.selected(m_configScreenBtnTVYM))
|
||||
m_cfg.setInt("GENERAL", "tv_y", min(max(-30, m_cfg.getInt("GENERAL", "tv_y", 0) + step), 30));
|
||||
_showConfigScreen();
|
||||
m_vid.set2DViewport(m_cfg.getInt("GENERAL", "tv_width", 640), m_cfg.getInt("GENERAL", "tv_height", 480), m_cfg.getInt("GENERAL", "tv_x", 0), m_cfg.getInt("GENERAL", "tv_y", 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
_hideConfigScreen();
|
||||
return change;
|
||||
}
|
||||
|
||||
void CMenu::_initConfigScreenMenu()
|
||||
{
|
||||
_addUserLabels(m_configScreenLblUser, ARRAY_SIZE(m_configScreenLblUser), "SCREEN");
|
||||
m_configScreenBg = _texture("SCREEN/BG", "texture", theme.bg, false);
|
||||
m_configScreenLblTVWidth = _addLabel("SCREEN/TVWIDTH", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configScreenLblTVWidthVal = _addLabel("SCREEN/TVWIDTH_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configScreenBtnTVWidthM = _addPicButton("SCREEN/TVWIDTH_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
|
||||
m_configScreenBtnTVWidthP = _addPicButton("SCREEN/TVWIDTH_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
|
||||
m_configScreenLblTVHeight = _addLabel("SCREEN/TVHEIGHT", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configScreenLblTVHeightVal = _addLabel("SCREEN/TVHEIGHT_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configScreenBtnTVHeightM = _addPicButton("SCREEN/TVHEIGHT_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
|
||||
m_configScreenBtnTVHeightP = _addPicButton("SCREEN/TVHEIGHT_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
|
||||
m_configScreenLblTVX = _addLabel("SCREEN/TVX", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configScreenLblTVXVal = _addLabel("SCREEN/TVX_BTN", theme.btnFont, L"", 468, 250, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configScreenBtnTVXM = _addPicButton("SCREEN/TVX_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 250, 48, 48);
|
||||
m_configScreenBtnTVXP = _addPicButton("SCREEN/TVX_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 250, 48, 48);
|
||||
m_configScreenLblTVY = _addLabel("SCREEN/TVY", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configScreenLblTVYVal = _addLabel("SCREEN/TVY_BTN", theme.btnFont, L"", 468, 310, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configScreenBtnTVYM = _addPicButton("SCREEN/TVY_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48);
|
||||
m_configScreenBtnTVYP = _addPicButton("SCREEN/TVY_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48);
|
||||
//
|
||||
_setHideAnim(m_configScreenLblTVWidth, "SCREEN/TVWIDTH", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configScreenLblTVWidthVal, "SCREEN/TVWIDTH_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configScreenBtnTVWidthM, "SCREEN/TVWIDTH_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configScreenBtnTVWidthP, "SCREEN/TVWIDTH_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_configScreenLblTVHeight, "SCREEN/TVHEIGHT", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configScreenLblTVHeightVal, "SCREEN/TVHEIGHT_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configScreenBtnTVHeightM, "SCREEN/TVHEIGHT_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configScreenBtnTVHeightP, "SCREEN/TVHEIGHT_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_configScreenLblTVX, "SCREEN/TVX", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configScreenLblTVXVal, "SCREEN/TVX_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configScreenBtnTVXM, "SCREEN/TVX_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configScreenBtnTVXP, "SCREEN/TVX_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_setHideAnim(m_configScreenLblTVY, "SCREEN/TVY", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configScreenLblTVYVal, "SCREEN/TVY_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configScreenBtnTVYM, "SCREEN/TVY_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configScreenBtnTVYP, "SCREEN/TVY_PLUS", -50, 0, 1.f, 0.f);
|
||||
|
||||
_hideConfigScreen(true);
|
||||
_textConfigScreen();
|
||||
}
|
||||
|
||||
void CMenu::_textConfigScreen(void)
|
||||
{
|
||||
m_btnMgr.setText(m_configScreenLblTVWidth, _t("cfgc2", L"Adjust TV width"));
|
||||
m_btnMgr.setText(m_configScreenLblTVHeight, _t("cfgc3", L"Adjust TV height"));
|
||||
m_btnMgr.setText(m_configScreenLblTVX, _t("cfgc6", L"Horizontal offset"));
|
||||
m_btnMgr.setText(m_configScreenLblTVY, _t("cfgc7", L"Vertical offset"));
|
||||
}
|
@ -1,176 +0,0 @@
|
||||
|
||||
#include "menu.hpp"
|
||||
|
||||
void CMenu::_hideConfigSnd(bool instant)
|
||||
{
|
||||
_hideConfigCommon(instant);
|
||||
|
||||
m_btnMgr.hide(m_configSndLblBnrVol, instant);
|
||||
m_btnMgr.hide(m_configSndLblBnrVolVal, instant);
|
||||
m_btnMgr.hide(m_configSndBtnBnrVolP, instant);
|
||||
m_btnMgr.hide(m_configSndBtnBnrVolM, instant);
|
||||
m_btnMgr.hide(m_configSndLblMusicVol, instant);
|
||||
m_btnMgr.hide(m_configSndLblMusicVolVal, instant);
|
||||
m_btnMgr.hide(m_configSndBtnMusicVolP, instant);
|
||||
m_btnMgr.hide(m_configSndBtnMusicVolM, instant);
|
||||
m_btnMgr.hide(m_configSndLblGuiVol, instant);
|
||||
m_btnMgr.hide(m_configSndLblGuiVolVal, instant);
|
||||
m_btnMgr.hide(m_configSndBtnGuiVolP, instant);
|
||||
m_btnMgr.hide(m_configSndBtnGuiVolM, instant);
|
||||
m_btnMgr.hide(m_configSndLblCFVol, instant);
|
||||
m_btnMgr.hide(m_configSndLblCFVolVal, instant);
|
||||
m_btnMgr.hide(m_configSndBtnCFVolP, instant);
|
||||
m_btnMgr.hide(m_configSndBtnCFVolM, instant);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configSndLblUser); ++i)
|
||||
if(m_configSndLblUser[i] != -1)
|
||||
m_btnMgr.hide(m_configSndLblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_showConfigSnd(void)
|
||||
{
|
||||
_showConfigCommon(m_configSndBg, 5);
|
||||
|
||||
m_btnMgr.show(m_configSndLblBnrVol);
|
||||
m_btnMgr.show(m_configSndLblBnrVolVal);
|
||||
m_btnMgr.show(m_configSndBtnBnrVolP);
|
||||
m_btnMgr.show(m_configSndBtnBnrVolM);
|
||||
m_btnMgr.show(m_configSndLblMusicVol);
|
||||
m_btnMgr.show(m_configSndLblMusicVolVal);
|
||||
m_btnMgr.show(m_configSndBtnMusicVolP);
|
||||
m_btnMgr.show(m_configSndBtnMusicVolM);
|
||||
m_btnMgr.show(m_configSndLblGuiVol);
|
||||
m_btnMgr.show(m_configSndLblGuiVolVal);
|
||||
m_btnMgr.show(m_configSndBtnGuiVolP);
|
||||
m_btnMgr.show(m_configSndBtnGuiVolM);
|
||||
m_btnMgr.show(m_configSndLblCFVol);
|
||||
m_btnMgr.show(m_configSndLblCFVolVal);
|
||||
m_btnMgr.show(m_configSndBtnCFVolP);
|
||||
m_btnMgr.show(m_configSndBtnCFVolM);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configSndLblUser); ++i)
|
||||
if(m_configSndLblUser[i] != -1)
|
||||
m_btnMgr.show(m_configSndLblUser[i]);
|
||||
|
||||
m_btnMgr.setText(m_configSndLblGuiVolVal, wfmt(L"%i", m_cfg.getInt("GENERAL", "sound_volume_gui", 255)));
|
||||
m_btnMgr.setText(m_configSndLblCFVolVal, wfmt(L"%i", m_cfg.getInt("GENERAL", "sound_volume_coverflow", 255)));
|
||||
m_btnMgr.setText(m_configSndLblMusicVolVal, wfmt(L"%i", m_cfg.getInt("GENERAL", "sound_volume_music", 255)));
|
||||
m_btnMgr.setText(m_configSndLblBnrVolVal, wfmt(L"%i", m_cfg.getInt("GENERAL", "sound_volume_bnr", 255)));
|
||||
}
|
||||
|
||||
int CMenu::_configSnd(void)
|
||||
{
|
||||
int change = CONFIG_PAGE_NO_CHANGE;
|
||||
SetupInput();
|
||||
int step = 1;
|
||||
|
||||
_showConfigSnd();
|
||||
while(!m_exit)
|
||||
{
|
||||
change = _configCommon();
|
||||
if (change != CONFIG_PAGE_NO_CHANGE)
|
||||
break;
|
||||
if (BTN_A_REPEAT || BTN_A_PRESSED)
|
||||
{
|
||||
if (m_btnMgr.selected(m_configSndBtnBnrVolP))
|
||||
{
|
||||
m_cfg.setInt("GENERAL", "sound_volume_bnr", min(m_cfg.getInt("GENERAL", "sound_volume_bnr", 255) + step, 255));
|
||||
_showConfigSnd();
|
||||
m_bnrSndVol = m_cfg.getInt("GENERAL", "sound_volume_bnr", 255);
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnBnrVolM))
|
||||
{
|
||||
m_cfg.setInt("GENERAL", "sound_volume_bnr", max(m_cfg.getInt("GENERAL", "sound_volume_bnr", 255) - step, 0));
|
||||
_showConfigSnd();
|
||||
m_bnrSndVol = m_cfg.getInt("GENERAL", "sound_volume_bnr", 255);
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnGuiVolP))
|
||||
{
|
||||
m_cfg.setInt("GENERAL", "sound_volume_gui", min(m_cfg.getInt("GENERAL", "sound_volume_gui", 255) + step, 255));
|
||||
_showConfigSnd();
|
||||
m_btnMgr.setSoundVolume(m_cfg.getInt("GENERAL", "sound_volume_gui", 255));
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnGuiVolM))
|
||||
{
|
||||
m_cfg.setInt("GENERAL", "sound_volume_gui", max(m_cfg.getInt("GENERAL", "sound_volume_gui", 255) - step, 0));
|
||||
_showConfigSnd();
|
||||
m_btnMgr.setSoundVolume(m_cfg.getInt("GENERAL", "sound_volume_gui", 255));
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnMusicVolP))
|
||||
{
|
||||
int musicVol = min(m_cfg.getInt("GENERAL", "sound_volume_music", 255) + step, 255);
|
||||
m_cfg.setInt("GENERAL", "sound_volume_music", musicVol);
|
||||
_showConfigSnd();
|
||||
MusicPlayer.SetMaxVolume(musicVol);
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnMusicVolM))
|
||||
{
|
||||
int musicVol = max(m_cfg.getInt("GENERAL", "sound_volume_music", 255) - step, 0);
|
||||
m_cfg.setInt("GENERAL", "sound_volume_music", musicVol);
|
||||
_showConfigSnd();
|
||||
MusicPlayer.SetMaxVolume(musicVol);
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnCFVolP))
|
||||
{
|
||||
m_cfg.setInt("GENERAL", "sound_volume_coverflow", min(m_cfg.getInt("GENERAL", "sound_volume_coverflow", 255) + step, 255));
|
||||
_showConfigSnd();
|
||||
CoverFlow.setSoundVolume(m_cfg.getInt("GENERAL", "sound_volume_coverflow", 255));
|
||||
}
|
||||
else if (m_btnMgr.selected(m_configSndBtnCFVolM))
|
||||
{
|
||||
m_cfg.setInt("GENERAL", "sound_volume_coverflow", max(m_cfg.getInt("GENERAL", "sound_volume_coverflow", 255) - step, 0));
|
||||
_showConfigSnd();
|
||||
CoverFlow.setSoundVolume(m_cfg.getInt("GENERAL", "sound_volume_coverflow", 255));
|
||||
}
|
||||
}
|
||||
}
|
||||
_hideConfigSnd();
|
||||
return change;
|
||||
}
|
||||
|
||||
void CMenu::_initConfigSndMenu()
|
||||
{
|
||||
_addUserLabels(m_configSndLblUser, ARRAY_SIZE(m_configSndLblUser), "CONFIGSND");
|
||||
m_configSndBg = _texture("CONFIGSND/BG", "texture", theme.bg, false);
|
||||
m_configSndLblMusicVol = _addLabel("CONFIGSND/MUSIC_VOL", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configSndLblMusicVolVal = _addLabel("CONFIGSND/MUSIC_VOL_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configSndBtnMusicVolM = _addPicButton("CONFIGSND/MUSIC_VOL_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
|
||||
m_configSndBtnMusicVolP = _addPicButton("CONFIGSND/MUSIC_VOL_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
|
||||
m_configSndLblGuiVol = _addLabel("CONFIGSND/GUI_VOL", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configSndLblGuiVolVal = _addLabel("CONFIGSND/GUI_VOL_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configSndBtnGuiVolM = _addPicButton("CONFIGSND/GUI_VOL_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
|
||||
m_configSndBtnGuiVolP = _addPicButton("CONFIGSND/GUI_VOL_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
|
||||
m_configSndLblCFVol = _addLabel("CONFIGSND/CF_VOL", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configSndLblCFVolVal = _addLabel("CONFIGSND/CF_VOL_BTN", theme.btnFont, L"", 468, 250, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configSndBtnCFVolM = _addPicButton("CONFIGSND/CF_VOL_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 250, 48, 48);
|
||||
m_configSndBtnCFVolP = _addPicButton("CONFIGSND/CF_VOL_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 250, 48, 48);
|
||||
m_configSndLblBnrVol = _addLabel("CONFIGSND/BNR_VOL", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_configSndLblBnrVolVal = _addLabel("CONFIGSND/BNR_VOL_BTN", theme.btnFont, L"", 468, 310, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_configSndBtnBnrVolM = _addPicButton("CONFIGSND/BNR_VOL_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48);
|
||||
m_configSndBtnBnrVolP = _addPicButton("CONFIGSND/BNR_VOL_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48);
|
||||
//
|
||||
_setHideAnim(m_configSndLblMusicVol, "CONFIGSND/MUSIC_VOL", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configSndLblMusicVolVal, "CONFIGSND/MUSIC_VOL_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndBtnMusicVolM, "CONFIGSND/MUSIC_VOL_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndBtnMusicVolP, "CONFIGSND/MUSIC_VOL_PLUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndLblGuiVol, "CONFIGSND/GUI_VOL", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configSndLblGuiVolVal, "CONFIGSND/GUI_VOL_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndBtnGuiVolM, "CONFIGSND/GUI_VOL_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndBtnGuiVolP, "CONFIGSND/GUI_VOL_PLUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndLblCFVol, "CONFIGSND/CF_VOL", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configSndLblCFVolVal, "CONFIGSND/CF_VOL_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndBtnCFVolM, "CONFIGSND/CF_VOL_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndBtnCFVolP, "CONFIGSND/CF_VOL_PLUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndLblBnrVol, "CONFIGSND/BNR_VOL", 50, 0, -2.f, 0.f);
|
||||
_setHideAnim(m_configSndLblBnrVolVal, "CONFIGSND/BNR_VOL_BTN", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndBtnBnrVolM, "CONFIGSND/BNR_VOL_MINUS", -50, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_configSndBtnBnrVolP, "CONFIGSND/BNR_VOL_PLUS", -50, 0, 1.f, 0.f);
|
||||
_hideConfigSnd(true);
|
||||
_textConfigSnd();
|
||||
}
|
||||
|
||||
void CMenu::_textConfigSnd(void)
|
||||
{
|
||||
m_btnMgr.setText(m_configSndLblMusicVol, _t("cfgs1", L"Music volume"));
|
||||
m_btnMgr.setText(m_configSndLblGuiVol, _t("cfgs2", L"GUI sound volume"));
|
||||
m_btnMgr.setText(m_configSndLblCFVol, _t("cfgs3", L"Coverflow sound volume"));
|
||||
m_btnMgr.setText(m_configSndLblBnrVol, _t("cfgs4", L"Game sound volume"));
|
||||
}
|
@ -10,12 +10,13 @@ void CMenu::error(const wstringEx &msg)
|
||||
SetupInput();
|
||||
_hideAbout();
|
||||
_hideCode();
|
||||
_hideConfig();
|
||||
_hideConfigAdv();
|
||||
_hideConfig3();
|
||||
_hideConfig4();
|
||||
_hideConfigScreen();
|
||||
_hideConfigSnd();
|
||||
_hideConfigMain();
|
||||
//_hideConfig();
|
||||
//_hideConfigAdv();
|
||||
//_hideConfig3();
|
||||
//_hideConfig4();
|
||||
//_hideConfigScreen();
|
||||
//_hideConfigSnd();
|
||||
_hideDownload();
|
||||
_hideExitTo();
|
||||
_hideGame();
|
||||
|
@ -146,7 +146,7 @@ bool CMenu::_gameinfo(void)
|
||||
if(m_gameinfoLblControls[i] != -1)
|
||||
m_btnMgr.hide(m_gameinfoLblControls[i], true);
|
||||
|
||||
// When showing synopsis, only show user labels 2 and 3
|
||||
// When showing synopsis, only show user labels 3 thru 5. 1 and 2 are hidden.
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblUser); ++i)
|
||||
if(i < ARRAY_SIZE(m_gameinfoLblUser) / 2)
|
||||
m_btnMgr.hide(m_gameinfoLblUser[i], true);
|
||||
@ -196,7 +196,7 @@ bool CMenu::_gameinfo(void)
|
||||
if(m_gameinfoLblControls[i] != -1 && i < cnt_controls)
|
||||
m_btnMgr.show(m_gameinfoLblControls[i]);
|
||||
|
||||
// When showing synopsis, only show user labels 2 and 3
|
||||
// When showing synopsis, only show user labels 3 thru 5. 1 and 2 are hidden.
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblUser); ++i)
|
||||
if(i < ARRAY_SIZE(m_gameinfoLblUser) / 2)
|
||||
m_btnMgr.show(m_gameinfoLblUser[i]);
|
||||
@ -292,7 +292,7 @@ void CMenu::_showGameInfo(void)
|
||||
}
|
||||
}
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblUser); ++i)
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_gameinfoLblUser); ++i)// show user labels 1 and 2.
|
||||
if(i < ARRAY_SIZE(m_gameinfoLblUser) / 2)
|
||||
m_btnMgr.show(m_gameinfoLblUser[i]);
|
||||
|
||||
@ -308,7 +308,7 @@ void CMenu::_showGameInfo(void)
|
||||
void CMenu::_initGameInfoMenu()
|
||||
{
|
||||
TexData emptyTex;
|
||||
_addUserLabels(m_gameinfoLblUser, 0, 1, "GAMEINFO");
|
||||
_addUserLabels(m_gameinfoLblUser, 0, 1, "GAMEINFO");// 1 and 3 will be underneath everything.
|
||||
_addUserLabels(m_gameinfoLblUser, 2, 1, "GAMEINFO");
|
||||
|
||||
m_gameinfoBg = _texture("GAMEINFO/BG", "texture", theme.bg, false);
|
||||
@ -326,7 +326,7 @@ void CMenu::_initGameInfoMenu()
|
||||
m_gameinfoLblCartDisk = _addLabel("GAMEINFO/CART", theme.txtFont, L"", 400, 320, 100, 100, theme.txtFontColor, 0, m_cart);
|
||||
m_gameinfoLblRomInfo = _addLabel("GAMEINFO/ROMINFO", theme.txtFont, L"", 40, 80, 300, 300, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
|
||||
|
||||
_addUserLabels(m_gameinfoLblUser, 1, 1, "GAMEINFO");
|
||||
_addUserLabels(m_gameinfoLblUser, 1, 1, "GAMEINFO");// 2, 4, and 5 will be above everything except for the things that follow below.
|
||||
_addUserLabels(m_gameinfoLblUser, 3, 2, "GAMEINFO");
|
||||
|
||||
m_gameinfoLblTitle = _addLabel("GAMEINFO/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
|
@ -108,7 +108,7 @@ bool CMenu::_Home(void)
|
||||
else if(m_btnMgr.selected(m_homeBtnSettings))
|
||||
{
|
||||
_hideHome();
|
||||
_config(1);
|
||||
_configMain();
|
||||
//if(m_refreshGameList)
|
||||
break;
|
||||
_showHome();
|
||||
|
@ -542,7 +542,7 @@ int CMenu::main(void)
|
||||
{
|
||||
// main menu global settings
|
||||
_hideMain();
|
||||
_config(1);
|
||||
_configMain();
|
||||
if(prevTheme != m_themeName)
|
||||
{
|
||||
// new theme - exit wiiflow and reload
|
||||
@ -615,6 +615,9 @@ int CMenu::main(void)
|
||||
m_favorites = !m_favorites;
|
||||
m_cfg.setBool(_domainFromView(), "favorites", m_favorites);
|
||||
_initCF();
|
||||
m_showtimer = 240;
|
||||
m_btnMgr.setText(m_mainLblNotice, wfmt(_fmt("main7", L"Total Games: %i"), CoverFlow.size()));
|
||||
m_btnMgr.show(m_mainLblNotice);
|
||||
}
|
||||
else if(!CoverFlow.empty() && CoverFlow.select())
|
||||
{
|
||||
@ -1005,6 +1008,7 @@ void CMenu::_initMainMenu()
|
||||
TexData texFavOffS;
|
||||
TexData bgLQ;
|
||||
TexData emptyTex;
|
||||
TexData texUser1;
|
||||
|
||||
m_mainBg = _texture("MAIN/BG", "texture", theme.bg, false);
|
||||
if(m_theme.loaded() && TexHandle.fromImageFile(bgLQ, fmt("%s/%s", m_themeDataDir.c_str(), m_theme.getString("MAIN/BG", "texture").c_str()), GX_TF_CMPR, 64, 64) == TE_OK)
|
||||
@ -1036,6 +1040,7 @@ void CMenu::_initMainMenu()
|
||||
TexHandle.fromImageFile(texFavOnS, fmt("%s/gamefavons.png", m_imgsDir.c_str()));
|
||||
TexHandle.fromImageFile(texFavOff, fmt("%s/gamefavoff.png", m_imgsDir.c_str()));
|
||||
TexHandle.fromImageFile(texFavOffS, fmt("%s/gamefavoffs.png", m_imgsDir.c_str()));
|
||||
TexHandle.fromImageFile(texUser1, fmt("%s/mainUser1.png", m_imgsDir.c_str()));
|
||||
|
||||
_addUserLabels(m_mainLblUser, ARRAY_SIZE(m_mainLblUser), "MAIN");
|
||||
|
||||
|
@ -417,56 +417,56 @@ void CMenu::_hideSM_Editor(bool instant)
|
||||
m_btnMgr.hide(m_configLblTitle, instant);
|
||||
m_btnMgr.hide(m_configBtnBack, instant);
|
||||
|
||||
m_btnMgr.hide(m_config7Lbl1, instant);
|
||||
m_btnMgr.hide(m_config7Btn1, instant);
|
||||
m_btnMgr.hide(m_config7Lbl2, instant);
|
||||
m_btnMgr.hide(m_config7Btn2, instant);
|
||||
m_btnMgr.hide(m_config7Lbl3, instant);
|
||||
m_btnMgr.hide(m_config7Btn3, instant);
|
||||
//m_btnMgr.hide(m_config7Lbl4, instant);
|
||||
//m_btnMgr.hide(m_config7Btn4, instant);
|
||||
m_btnMgr.hide(m_configLbl1, instant);
|
||||
m_btnMgr.hide(m_configBtn1, instant);
|
||||
m_btnMgr.hide(m_configLbl2, instant);
|
||||
m_btnMgr.hide(m_configBtn2, instant);
|
||||
m_btnMgr.hide(m_configLbl3, instant);
|
||||
m_btnMgr.hide(m_configBtn3, instant);
|
||||
//m_btnMgr.hide(m_configLbl4, instant);
|
||||
//m_btnMgr.hide(m_configBtn4, instant);
|
||||
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_config7LblUser); ++i)
|
||||
if(m_config7LblUser[i] != -1)
|
||||
m_btnMgr.hide(m_config7LblUser[i], instant);
|
||||
for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
|
||||
if(m_configLblUser[i] != -1)
|
||||
m_btnMgr.hide(m_configLblUser[i], instant);
|
||||
}
|
||||
|
||||
void CMenu::_showSM_Editor()
|
||||
{
|
||||
m_btnMgr.hide(m_config7Lbl1, true);
|
||||
m_btnMgr.hide(m_config7Btn1, true);
|
||||
m_btnMgr.hide(m_config7Lbl2, true);
|
||||
m_btnMgr.hide(m_config7Btn2, true);
|
||||
m_btnMgr.hide(m_config7Lbl3, true);
|
||||
m_btnMgr.hide(m_config7Btn3, true);
|
||||
//m_btnMgr.hide(m_config7Lbl4, true);
|
||||
//m_btnMgr.hide(m_config7Btn4, true);
|
||||
m_btnMgr.hide(m_configLbl1, true);
|
||||
m_btnMgr.hide(m_configBtn1, true);
|
||||
m_btnMgr.hide(m_configLbl2, true);
|
||||
m_btnMgr.hide(m_configBtn2, true);
|
||||
m_btnMgr.hide(m_configLbl3, true);
|
||||
m_btnMgr.hide(m_configBtn3, true);
|
||||
//m_btnMgr.hide(m_configLbl4, true);
|
||||
//m_btnMgr.hide(m_configBtn4, true);
|
||||
|
||||
_setBg(m_config7Bg, m_config7Bg);
|
||||
for(u32 i = 0; i < ARRAY_SIZE(m_config7LblUser); ++i)
|
||||
if(m_config7LblUser[i] != -1)
|
||||
m_btnMgr.show(m_config7LblUser[i]);
|
||||
_setBg(m_configBg, m_configBg);
|
||||
for(u32 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
|
||||
if(m_configLblUser[i] != -1)
|
||||
m_btnMgr.show(m_configLblUser[i]);
|
||||
|
||||
m_btnMgr.show(m_configLblTitle);
|
||||
m_btnMgr.show(m_configBtnBack);
|
||||
|
||||
m_btnMgr.show(m_config7Lbl1);
|
||||
m_btnMgr.show(m_config7Btn1);
|
||||
m_btnMgr.show(m_config7Lbl2);
|
||||
m_btnMgr.show(m_config7Btn2);
|
||||
m_btnMgr.show(m_config7Lbl3);
|
||||
m_btnMgr.show(m_config7Btn3);
|
||||
//m_btnMgr.show(m_config7Lbl4);
|
||||
//m_btnMgr.show(m_config7Btn4);
|
||||
m_btnMgr.show(m_configLbl1);
|
||||
m_btnMgr.show(m_configBtn1);
|
||||
m_btnMgr.show(m_configLbl2);
|
||||
m_btnMgr.show(m_configBtn2);
|
||||
m_btnMgr.show(m_configLbl3);
|
||||
m_btnMgr.show(m_configBtn3);
|
||||
//m_btnMgr.show(m_configLbl4);
|
||||
//m_btnMgr.show(m_configBtn4);
|
||||
|
||||
m_btnMgr.setText(m_config7Lbl1, _t("smedit5", L"Hide source buttons"));
|
||||
m_btnMgr.setText(m_config7Btn1, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_config7Lbl2, _t("smedit6", L"Link source buttons to plugins"));
|
||||
m_btnMgr.setText(m_config7Btn2, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_config7Lbl3, _t("smedit7", L"Set plugin ROMs path"));
|
||||
m_btnMgr.setText(m_config7Btn3, _t("cfg14", L"Set"));
|
||||
//m_btnMgr.setText(m_config7Lbl4, _t("smedit8", L"Sourceflow settings"));
|
||||
//m_btnMgr.setText(m_config7Btn4, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_configLbl1, _t("smedit5", L"Hide source buttons"));
|
||||
m_btnMgr.setText(m_configBtn1, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_configLbl2, _t("smedit6", L"Link source buttons to plugins"));
|
||||
m_btnMgr.setText(m_configBtn2, _t("cfg14", L"Set"));
|
||||
m_btnMgr.setText(m_configLbl3, _t("smedit7", L"Set plugin ROMs path"));
|
||||
m_btnMgr.setText(m_configBtn3, _t("cfg14", L"Set"));
|
||||
//m_btnMgr.setText(m_configLbl4, _t("smedit8", L"Sourceflow settings"));
|
||||
//m_btnMgr.setText(m_configBtn4, _t("cfg14", L"Set"));
|
||||
}
|
||||
|
||||
void CMenu::_SM_Editor()
|
||||
@ -487,25 +487,25 @@ void CMenu::_SM_Editor()
|
||||
m_btnMgr.down();
|
||||
if(BTN_A_PRESSED)
|
||||
{
|
||||
if(m_btnMgr.selected(m_config7Btn1))
|
||||
if(m_btnMgr.selected(m_configBtn1))
|
||||
{
|
||||
_hideSM_Editor();
|
||||
_checkboxesMenu(1);
|
||||
_showSM_Editor();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn2))
|
||||
else if(m_btnMgr.selected(m_configBtn2))
|
||||
{
|
||||
_hideSM_Editor();
|
||||
_checkboxesMenu(2);
|
||||
_showSM_Editor();
|
||||
}
|
||||
else if(m_btnMgr.selected(m_config7Btn3))
|
||||
else if(m_btnMgr.selected(m_configBtn3))
|
||||
{
|
||||
_hideSM_Editor();
|
||||
_checkboxesMenu(3);
|
||||
_showSM_Editor();
|
||||
}
|
||||
/*else if(m_btnMgr.selected(m_config7Btn4))
|
||||
/*else if(m_btnMgr.selected(m_configBtn4))
|
||||
{
|
||||
_hideSM_Editor();
|
||||
_CfgSrc();
|
||||
|
@ -156,6 +156,8 @@ void CMenu::_setSrcFlow(int version)
|
||||
m_cfg.setInt(SOURCEFLOW_DOMAIN, fn, curflow);
|
||||
if(!sm_tier)
|
||||
m_cfg.setInt(SOURCEFLOW_DOMAIN, "last_cf_mode", curflow);
|
||||
if(m_source.has("general", "flow"))
|
||||
m_source.setInt("general", "flow", curflow);// saved later when exiting or launching a game.
|
||||
}
|
||||
|
||||
/* return back to previous tier or home base tier */
|
||||
|
@ -431,6 +431,10 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
{
|
||||
fsop_deleteFile(CF_Hdr->path);
|
||||
upd_plgin = true;
|
||||
const char *coverFolder = m_plugin.GetCoverFolderName(CF_Hdr->settings[0]);
|
||||
const char *gameNameOrID = CoverFlow.getFilenameId(CF_Hdr);
|
||||
//delete cached wfc but not cover png
|
||||
fsop_deleteFile(fmt("%s/%s/%s.wfc", m_cacheDir.c_str(), coverFolder, gameNameOrID));
|
||||
}
|
||||
else if(CF_Hdr->type == TYPE_WII_GAME)
|
||||
{
|
||||
@ -459,8 +463,13 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
out = true;
|
||||
break;
|
||||
}
|
||||
if(m_cfg.getBool("GENERAL", "delete_cover_and_game", false))
|
||||
RemoveCover(CF_Hdr->id);
|
||||
if(CF_Hdr->type != TYPE_PLUGIN)
|
||||
{
|
||||
if(m_cfg.getBool("GENERAL", "delete_cover_and_game", false))
|
||||
RemoveCover(CF_Hdr->id);
|
||||
else // always remove the cached wfc file
|
||||
fsop_deleteFile(fmt("%s/%s.wfc", m_cacheDir.c_str(), CF_Hdr->id));
|
||||
}
|
||||
m_btnMgr.show(m_wbfsPBar);
|
||||
m_btnMgr.setProgress(m_wbfsPBar, 0.f, true);
|
||||
m_btnMgr.setProgress(m_wbfsPBar, 1.f);
|
||||
|
Loading…
Reference in New Issue
Block a user