- menu partitions config now using main config buttons.

This commit is contained in:
Fledge68 2022-07-07 17:12:42 -05:00
parent 637be5b08c
commit 5a4f3fd759
3 changed files with 40 additions and 105 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

After

Width:  |  Height:  |  Size: 4.3 MiB

View File

@ -933,7 +933,7 @@ private:
void _hideConfigSrc(bool instant = true); void _hideConfigSrc(bool instant = true);
void _hideBoot(bool instant = true); void _hideBoot(bool instant = true);
void _hideCoverBanner(bool instant = true); void _hideCoverBanner(bool instant = true);
void _hidePartitionsCfg(bool instant = false); void _hidePartitionsCfg(bool instant = true);
void _hidePaths(bool instant = true); void _hidePaths(bool instant = true);
void _hideNandEmu(bool instant = true); void _hideNandEmu(bool instant = true);
void _hideDownload(bool instant = false); void _hideDownload(bool instant = false);

View File

@ -5,26 +5,6 @@ s16 m_partitionsLblTitle;
s16 m_partitionsBtnBack; s16 m_partitionsBtnBack;
s16 m_partitionsLblUser[4]; s16 m_partitionsLblUser[4];
s16 m_partitionsLblWii;
s16 m_partitionsLblWiiVal;
s16 m_partitionsBtnWiiP;
s16 m_partitionsBtnWiiM;
s16 m_partitionsLblGC;
s16 m_partitionsLblGCVal;
s16 m_partitionsBtnGCP;
s16 m_partitionsBtnGCM;
s16 m_partitionsLblChannels;
s16 m_partitionsLblChannelsVal;
s16 m_partitionsBtnChannelsP;
s16 m_partitionsBtnChannelsM;
s16 m_partitionsLblPlugin;
s16 m_partitionsLblPluginVal;
s16 m_partitionsBtnPluginP;
s16 m_partitionsBtnPluginM;
TexData m_partitionsBg; TexData m_partitionsBg;
void CMenu::_hidePartitionsCfg(bool instant) void CMenu::_hidePartitionsCfg(bool instant)
@ -34,58 +14,50 @@ void CMenu::_hidePartitionsCfg(bool instant)
for(u8 i = 0; i < ARRAY_SIZE(m_partitionsLblUser); ++i) for(u8 i = 0; i < ARRAY_SIZE(m_partitionsLblUser); ++i)
if(m_partitionsLblUser[i] != -1) if(m_partitionsLblUser[i] != -1)
m_btnMgr.hide(m_partitionsLblUser[i], instant); m_btnMgr.hide(m_partitionsLblUser[i], instant);
m_btnMgr.hide(m_partitionsLblWii, instant);
m_btnMgr.hide(m_partitionsLblWiiVal, instant);
m_btnMgr.hide(m_partitionsBtnWiiP, instant);
m_btnMgr.hide(m_partitionsBtnWiiM, instant);
m_btnMgr.hide(m_partitionsLblGC, instant);
m_btnMgr.hide(m_partitionsLblGCVal, instant);
m_btnMgr.hide(m_partitionsBtnGCP, instant);
m_btnMgr.hide(m_partitionsBtnGCM, instant);
m_btnMgr.hide(m_partitionsLblChannels, instant);
m_btnMgr.hide(m_partitionsLblChannelsVal, instant);
m_btnMgr.hide(m_partitionsBtnChannelsP, instant);
m_btnMgr.hide(m_partitionsBtnChannelsM, instant);
m_btnMgr.hide(m_partitionsLblPlugin, instant);
m_btnMgr.hide(m_partitionsLblPluginVal, instant);
m_btnMgr.hide(m_partitionsBtnPluginP, instant);
m_btnMgr.hide(m_partitionsBtnPluginM, instant);
} }
void CMenu::_showPartitionsCfg(void) void CMenu::_showPartitionsCfg(void)
{ {
_setBg(m_partitionsBg, m_partitionsBg);
m_btnMgr.show(m_partitionsLblTitle); m_btnMgr.show(m_partitionsLblTitle);
m_btnMgr.show(m_partitionsBtnBack); m_btnMgr.show(m_partitionsBtnBack);
for(u8 i = 0; i < ARRAY_SIZE(m_partitionsLblUser); ++i) for(u8 i = 0; i < ARRAY_SIZE(m_partitionsLblUser); ++i)
if(m_partitionsLblUser[i] != -1) if(m_partitionsLblUser[i] != -1)
m_btnMgr.show(m_partitionsLblUser[i]); m_btnMgr.show(m_partitionsLblUser[i]);
m_btnMgr.show(m_partitionsLblWii); m_btnMgr.setText(m_configLbl1, _t("part1", L"Wii Partition"));
m_btnMgr.show(m_partitionsLblWiiVal); m_btnMgr.setText(m_configLbl2, _t("part2", L"GameCube Partition"));
m_btnMgr.show(m_partitionsBtnWiiP); m_btnMgr.setText(m_configLbl3, _t("part3", L"Emu NANDS Partition"));
m_btnMgr.show(m_partitionsBtnWiiM); m_btnMgr.setText(m_configLbl4, _t("part4", L"Plugins Default Partition"));
m_btnMgr.show(m_partitionsLblGC);
m_btnMgr.show(m_partitionsLblGCVal);
m_btnMgr.show(m_partitionsBtnGCP);
m_btnMgr.show(m_partitionsBtnGCM);
m_btnMgr.show(m_partitionsLblChannels);
m_btnMgr.show(m_partitionsLblChannelsVal);
m_btnMgr.show(m_partitionsBtnChannelsP);
m_btnMgr.show(m_partitionsBtnChannelsM);
m_btnMgr.show(m_partitionsLblPlugin);
m_btnMgr.show(m_partitionsLblPluginVal);
m_btnMgr.show(m_partitionsBtnPluginP);
m_btnMgr.show(m_partitionsBtnPluginM);
const char *partitionname = DeviceName[m_cfg.getInt(WII_DOMAIN, "partition", 0)]; const char *partitionname = DeviceName[m_cfg.getInt(WII_DOMAIN, "partition", 0)];
m_btnMgr.setText(m_partitionsLblWiiVal, upperCase(partitionname)); m_btnMgr.setText(m_configLbl1Val, upperCase(partitionname));
partitionname = DeviceName[m_cfg.getInt(GC_DOMAIN, "partition", 0)]; partitionname = DeviceName[m_cfg.getInt(GC_DOMAIN, "partition", 0)];
m_btnMgr.setText(m_partitionsLblGCVal, upperCase(partitionname)); m_btnMgr.setText(m_configLbl2Val, upperCase(partitionname));
partitionname = DeviceName[m_cfg.getInt(CHANNEL_DOMAIN, "partition", 0)]; partitionname = DeviceName[m_cfg.getInt(CHANNEL_DOMAIN, "partition", 0)];
m_btnMgr.setText(m_partitionsLblChannelsVal, upperCase(partitionname)); m_btnMgr.setText(m_configLbl3Val, upperCase(partitionname));
partitionname = DeviceName[m_cfg.getInt(PLUGIN_DOMAIN, "partition", 0)]; partitionname = DeviceName[m_cfg.getInt(PLUGIN_DOMAIN, "partition", 0)];
m_btnMgr.setText(m_partitionsLblPluginVal, upperCase(partitionname)); m_btnMgr.setText(m_configLbl4Val, upperCase(partitionname));
m_btnMgr.show(m_configLbl1);
m_btnMgr.show(m_configLbl1Val);
m_btnMgr.show(m_configBtn1P);
m_btnMgr.show(m_configBtn1M);
m_btnMgr.show(m_configLbl2);
m_btnMgr.show(m_configLbl2Val);
m_btnMgr.show(m_configBtn2P);
m_btnMgr.show(m_configBtn2M);
m_btnMgr.show(m_configLbl3);
m_btnMgr.show(m_configLbl3Val);
m_btnMgr.show(m_configBtn3P);
m_btnMgr.show(m_configBtn3M);
m_btnMgr.show(m_configLbl4);
m_btnMgr.show(m_configLbl4Val);
m_btnMgr.show(m_configBtn4P);
m_btnMgr.show(m_configBtn4M);
} }
void CMenu::_partitionsCfg(void) void CMenu::_partitionsCfg(void)
@ -93,7 +65,6 @@ void CMenu::_partitionsCfg(void)
m_prev_view = m_current_view; m_prev_view = m_current_view;
int prevPartition = currentPartition; int prevPartition = currentPartition;
SetupInput(); SetupInput();
_setBg(m_partitionsBg, m_partitionsBg);
_showPartitionsCfg(); _showPartitionsCfg();
while(!m_exit) while(!m_exit)
{ {
@ -108,9 +79,9 @@ void CMenu::_partitionsCfg(void)
{ {
if(m_btnMgr.selected(m_partitionsBtnBack)) if(m_btnMgr.selected(m_partitionsBtnBack))
break; break;
else if(m_btnMgr.selected(m_partitionsBtnWiiP) || m_btnMgr.selected(m_partitionsBtnWiiM)) else if(m_btnMgr.selected(m_configBtn1P) || m_btnMgr.selected(m_configBtn1M))
{ {
s8 direction = m_btnMgr.selected(m_partitionsBtnWiiP) ? 1 : -1; s8 direction = m_btnMgr.selected(m_configBtn1P) ? 1 : -1;
currentPartition = m_cfg.getInt(WII_DOMAIN, "partition"); currentPartition = m_cfg.getInt(WII_DOMAIN, "partition");
m_current_view = COVERFLOW_WII; m_current_view = COVERFLOW_WII;
_setPartition(direction); _setPartition(direction);
@ -118,9 +89,9 @@ void CMenu::_partitionsCfg(void)
if(m_prev_view & COVERFLOW_WII) if(m_prev_view & COVERFLOW_WII)
m_refreshGameList = true; m_refreshGameList = true;
} }
else if(m_btnMgr.selected(m_partitionsBtnGCP) || m_btnMgr.selected(m_partitionsBtnGCM)) else if(m_btnMgr.selected(m_configBtn2P) || m_btnMgr.selected(m_configBtn2M))
{ {
s8 direction = m_btnMgr.selected(m_partitionsBtnGCP) ? 1 : -1; s8 direction = m_btnMgr.selected(m_configBtn2P) ? 1 : -1;
currentPartition = m_cfg.getInt(GC_DOMAIN, "partition"); currentPartition = m_cfg.getInt(GC_DOMAIN, "partition");
m_current_view = COVERFLOW_GAMECUBE; m_current_view = COVERFLOW_GAMECUBE;
_setPartition(direction); _setPartition(direction);
@ -128,9 +99,9 @@ void CMenu::_partitionsCfg(void)
if(m_prev_view & COVERFLOW_GAMECUBE) if(m_prev_view & COVERFLOW_GAMECUBE)
m_refreshGameList = true; m_refreshGameList = true;
} }
else if(m_btnMgr.selected(m_partitionsBtnChannelsP) || m_btnMgr.selected(m_partitionsBtnChannelsM)) else if(m_btnMgr.selected(m_configBtn3P) || m_btnMgr.selected(m_configBtn3M))
{ {
s8 direction = m_btnMgr.selected(m_partitionsBtnChannelsP) ? 1 : -1; s8 direction = m_btnMgr.selected(m_configBtn3P) ? 1 : -1;
currentPartition = m_cfg.getInt(CHANNEL_DOMAIN, "partition"); currentPartition = m_cfg.getInt(CHANNEL_DOMAIN, "partition");
m_current_view = COVERFLOW_CHANNEL; m_current_view = COVERFLOW_CHANNEL;
_setPartition(direction); _setPartition(direction);
@ -138,9 +109,9 @@ void CMenu::_partitionsCfg(void)
if(m_prev_view & COVERFLOW_CHANNEL) if(m_prev_view & COVERFLOW_CHANNEL)
m_refreshGameList = true; m_refreshGameList = true;
} }
else if(m_btnMgr.selected(m_partitionsBtnPluginP) || m_btnMgr.selected(m_partitionsBtnPluginM)) else if(m_btnMgr.selected(m_configBtn4P) || m_btnMgr.selected(m_configBtn4M))
{ {
s8 direction = m_btnMgr.selected(m_partitionsBtnPluginP) ? 1 : -1; s8 direction = m_btnMgr.selected(m_configBtn4P) ? 1 : -1;
currentPartition = m_cfg.getInt(PLUGIN_DOMAIN, "partition"); currentPartition = m_cfg.getInt(PLUGIN_DOMAIN, "partition");
m_current_view = COVERFLOW_PLUGIN; m_current_view = COVERFLOW_PLUGIN;
_setPartition(direction); _setPartition(direction);
@ -159,46 +130,14 @@ void CMenu::_partitionsCfg(void)
void CMenu::_initPartitionsCfgMenu() void CMenu::_initPartitionsCfgMenu()
{ {
m_partitionsBg = _texture("PARTCFG/BG", "texture", theme.bg, false); m_partitionsBg = _texture("PARTCFG/BG", "texture", theme.bg, false);
_addUserLabels(m_partitionsLblUser, ARRAY_SIZE(m_partitionsLblUser), "PARTCFG"); _addUserLabels(m_partitionsLblUser, ARRAY_SIZE(m_partitionsLblUser), "PARTCFG");
m_partitionsLblTitle = _addLabel("PARTCFG/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE); m_partitionsLblTitle = _addLabel("PARTCFG/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
m_partitionsBtnBack = _addButton("PARTCFG/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor); m_partitionsBtnBack = _addButton("PARTCFG/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
m_partitionsLblWii = _addLabel("PARTCFG/WII", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_partitionsLblWiiVal = _addLabel("PARTCFG/WII_BTN", theme.btnFont, L"", 468, 130, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_partitionsBtnWiiM = _addPicButton("PARTCFG/WII_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 130, 48, 48);
m_partitionsBtnWiiP = _addPicButton("PARTCFG/WII_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 130, 48, 48);
m_partitionsLblGC = _addLabel("PARTCFG/GC", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_partitionsLblGCVal = _addLabel("PARTCFG/GC_BTN", theme.btnFont, L"", 468, 190, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_partitionsBtnGCM = _addPicButton("PARTCFG/GC_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 190, 48, 48);
m_partitionsBtnGCP = _addPicButton("PARTCFG/GC_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 190, 48, 48);
m_partitionsLblChannels = _addLabel("PARTCFG/CHANNELS", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_partitionsLblChannelsVal = _addLabel("PARTCFG/CHANNELS_BTN", theme.btnFont, L"", 468, 250, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_partitionsBtnChannelsM = _addPicButton("PARTCFG/CHANNELS_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 250, 48, 48);
m_partitionsBtnChannelsP = _addPicButton("PARTCFG/CHANNELS_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 250, 48, 48);
m_partitionsLblPlugin = _addLabel("PARTCFG/PLUGIN", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
m_partitionsLblPluginVal = _addLabel("PARTCFG/PLUGIN_BTN", theme.btnFont, L"", 468, 310, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_partitionsBtnPluginM = _addPicButton("PARTCFG/PLUGIN_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 420, 310, 48, 48);
m_partitionsBtnPluginP = _addPicButton("PARTCFG/PLUGIN_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 572, 310, 48, 48);
_setHideAnim(m_partitionsLblTitle, "PARTCFG/TITLE", 0, 0, -2.f, 0.f); _setHideAnim(m_partitionsLblTitle, "PARTCFG/TITLE", 0, 0, -2.f, 0.f);
_setHideAnim(m_partitionsBtnBack, "PARTCFG/BACK_BTN", 0, 0, 1.f, -1.f); _setHideAnim(m_partitionsBtnBack, "PARTCFG/BACK_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_partitionsLblWii, "PARTCFG/WII", 50, 0, -2.f, 0.f);
_setHideAnim(m_partitionsLblWiiVal, "PARTCFG/WII_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsBtnWiiM, "PARTCFG/WII_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsBtnWiiP, "PARTCFG/WII_PLUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsLblGC, "PARTCFG/GC", 50, 0, -2.f, 0.f);
_setHideAnim(m_partitionsLblGCVal, "PARTCFG/GC_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsBtnGCM, "PARTCFG/GC_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsBtnGCP, "PARTCFG/GC_PLUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsLblChannels, "PARTCFG/CHANNELS", 50, 0, -2.f, 0.f);
_setHideAnim(m_partitionsLblChannelsVal, "PARTCFG/CHANNELS_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsBtnChannelsM, "PARTCFG/CHANNELS_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsBtnChannelsP, "PARTCFG/CHANNELS_PLUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsLblPlugin, "PARTCFG/PLUGIN", 50, 0, -2.f, 0.f);
_setHideAnim(m_partitionsLblPluginVal, "PARTCFG/PLUGIN_BTN", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsBtnPluginM, "PARTCFG/PLUGIN_MINUS", -50, 0, 1.f, 0.f);
_setHideAnim(m_partitionsBtnPluginP, "PARTCFG/PLUGIN_PLUS", -50, 0, 1.f, 0.f);
_hidePartitionsCfg(true); _hidePartitionsCfg(true);
_textPartitionsCfg(); _textPartitionsCfg();
} }
@ -206,9 +145,5 @@ void CMenu::_initPartitionsCfgMenu()
void CMenu::_textPartitionsCfg(void) void CMenu::_textPartitionsCfg(void)
{ {
m_btnMgr.setText(m_partitionsLblTitle, _t("part5", L"Partition Settings")); m_btnMgr.setText(m_partitionsLblTitle, _t("part5", L"Partition Settings"));
m_btnMgr.setText(m_partitionsLblWii, _t("part1", L"Wii Partition"));
m_btnMgr.setText(m_partitionsLblGC, _t("part2", L"GameCube Partition"));
m_btnMgr.setText(m_partitionsLblChannels, _t("part3", L"Emu NANDS Partition"));
m_btnMgr.setText(m_partitionsLblPlugin, _t("part4", L"Plugins Default Partition"));
m_btnMgr.setText(m_partitionsBtnBack, _t("cfg10", L"Back")); m_btnMgr.setText(m_partitionsBtnBack, _t("cfg10", L"Back"));
} }