WiiFlow_Lite/source/menu/menu_paths.cpp

262 lines
8.4 KiB
C++
Raw Normal View History

#include "menu.hpp"
s16 m_pathsLblTitle;
s16 m_pathsLblPage;
s16 m_pathsBtnPageM;
s16 m_pathsBtnPageP;
s16 m_pathsBtnBack;
s16 m_pathsLblUser[4];
TexData m_pathsBg;
u8 paths_curPage = 1;
u8 paths_Pages = 2;
void CMenu::_hidePaths(bool instant)
{
m_btnMgr.hide(m_pathsLblTitle, instant);
m_btnMgr.hide(m_pathsBtnBack, instant);
m_btnMgr.hide(m_pathsLblPage, instant);
m_btnMgr.hide(m_pathsBtnPageM, instant);
m_btnMgr.hide(m_pathsBtnPageP, instant);
for(u8 i = 0; i < ARRAY_SIZE(m_pathsLblUser); ++i)
if(m_pathsLblUser[i] != -1)
m_btnMgr.hide(m_pathsLblUser[i], instant);
_hideConfigButtons(instant);
}
void CMenu::_showPaths(void)
{
_setBg(m_pathsBg, m_pathsBg);
m_btnMgr.show(m_pathsLblTitle);
m_btnMgr.show(m_pathsBtnBack);
for(u32 i = 0; i < ARRAY_SIZE(m_pathsLblUser); ++i)
if(m_pathsLblUser[i] != -1)
m_btnMgr.show(m_pathsLblUser[i]);
m_btnMgr.setText(m_pathsLblPage, wfmt(L"%i / %i", paths_curPage, paths_Pages));
m_btnMgr.show(m_pathsLblPage);
m_btnMgr.show(m_pathsBtnPageM);
m_btnMgr.show(m_pathsBtnPageP);
_hideConfigButtons(true);
m_btnMgr.setText(m_configBtn1, _t("dl16", L"Set"));
m_btnMgr.setText(m_configBtn2, _t("dl16", L"Set"));
m_btnMgr.setText(m_configBtn3, _t("dl16", L"Set"));
m_btnMgr.setText(m_configBtn4, _t("dl16", L"Set"));
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);
if(paths_curPage == 1)
{
m_btnMgr.setText(m_configLbl1, _t("cfgp8", L"Box Covers"));
m_btnMgr.setText(m_configLbl2, _t("cfgp2", L"Flat Covers"));
m_btnMgr.setText(m_configLbl3, _t("cfgp9", L"Custom Banners"));
m_btnMgr.setText(m_configLbl4, _t("cfgp4", L"Banners Cache"));
}
else
{
m_btnMgr.setText(m_configLbl1, _t("cfgp5", L"Wii Games"));
m_btnMgr.setText(m_configLbl2, _t("cfgp6", L"GameCube Games"));
m_btnMgr.setText(m_configLbl3, _t("cfgp7", L"Music"));
m_btnMgr.setText(m_configLbl4, _t("cfgp10", L"WiiTDB Zip"));
}
}
void CMenu::_Paths(void)
{
const char *path;
paths_curPage = 1;
SetupInput();
_showPaths();
while(!m_exit)
{
_mainLoopCommon();
if (BTN_HOME_PRESSED || BTN_B_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_pathsBtnBack)))
break;
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_pathsBtnPageM)))
{
paths_curPage--;
if(paths_curPage == 0) paths_curPage = paths_Pages;
if(BTN_LEFT_PRESSED || BTN_MINUS_PRESSED)
m_btnMgr.click(m_pathsBtnPageM);
_showPaths();
}
else if (BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_pathsBtnPageP)))
{
paths_curPage++;
if(paths_curPage > paths_Pages) paths_curPage = 1;
if(BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED) m_btnMgr.click(m_pathsBtnPageP);
_showPaths();
}
else if (BTN_A_PRESSED && paths_curPage == 1)
{
if (m_btnMgr.selected(m_configBtn1))
{
_hidePaths();
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_box_covers").c_str());
if(strlen(path) > 0)
{
m_cfg.setString("GENERAL", "dir_box_covers", path);
m_boxPicDir = path;
-updated NIN_CFG_VERSION to 7 for Nintendont argsboot and added triforce arcade option to game settings menu. tested and working. -fixed wii u widescreen option in game config menu. should properly work now. thanks pBullet! -added a fix for coverflow titles display when coverflow has 3 or more rows. for some reason 3 or more rows caused the title to display improperly. -removed **disabled** message from source menu. no need for it - was a stupid idea. if you don't want it to display then remove it from your source menu or don't add it. when a view is disabled in wiiflow_lite.ini then only that view icon is disabled from showing on the main menu screen. -removed titles.ini which wasn't really used except for displaying the return to channel in settings. I googled it and nothing really showed up. it seemed to be the same as custom_titles.ini - it seemed useless. -removed cacheing sourceflow list. the list is never big enuff to worry about cacheing. plus if you add or remove source btns you won't have to reload cache for the changes to take effect. -removed max_source_btns from wiiflow_lite.ini - added code to get highest source menu btn so now source menu can have as many buttons as you like. -removed Manage Languages Menu - restored option to just change wiiflow language. no need for downloading languages and the google link didn't work anyway. when i make a pack all the languages will be included. -added flat cover options for sourceflow and homebrew view. can be turned on/off via their config menu's accessed via 'HOME' btn. -added config menu for homebrew view - press 'HOME' btn while in homebrew view to access it. config menu options are - switch apps partition, adjust coverflow, smallbox on/off, and flat covers on/off. -updated config menu for source menu/flow. options include - sourceflow on/off, adjust coverflow, smallbox on/off, flat covers on/off, and for source menu only - multisource on/off. -added coverflow layouts/versions for individual plugins - which means each plugin can have its own coverflow layout without affecting the others. -set HQ cover to default to ON -made it so coverflow doesn't reload every time you access another menu or change favorites or whatever. -added error messages to game and app launching if any of the bin files needed for launching are missing. previously whenever these errors occurred wiiflow would just exit without the user knowing why. Now the error message should display before exit so the user has an idea what went wrong. had to move cleanup() back some for the errors to show. hopefully that doesn't cause out of mem issues for users with large game collections. -added error messages to game config menu. now all config options will show but if you can't use it then a error shows telling you. such as 'use neek2o' will be available but if you set it to on and neek2o isn't installed then an error message shows. added error msgs for extracting and flashing saves too. -added show_mem=yes/no option to wiiflow_lite.ini under [DEBUG]. manually edit wiiflow_lite.ini to turn it on/off. if set to 'yes' wiiflow will show how much free mem is available on screen. no need to compile wiiflow for this option anymore. -cleaned up some of the boot up code. -starting a random game - just hold 'B' and press '-'. no longer press'B' on config or question mark icon and no need to allow it in wiiflow_lite.ini
2016-11-07 16:06:00 +01:00
//m_refreshGameList = true;
-fixed displaying errors on source menu -removed vipatch, country patch, private server and cheats defaults from wiiflow.ini. no need for default/global setting for those options. they all default to off internally in wiiflow. -now on file explorer menu pressing home btn returns you to device select so you don't have to keep backing up to get back to devices. -fixed a few minor problems with game configs, especially gc games. now all game config options should work properly. -now using bitwise operators and expressions on m_current_view to control which sources are selected. no more source= under each domain. just sources= under GENERAL. -replaced ocarina option from main settings pg3 with channels type option. no need for a global/default ocarina setting. channels type allows you to select real, emu, or both channels types for channels coverflow. which means no more pressing B on config icon to cycle thru the choices. -fixed a minor bug when downloading covers -changed newid.ini to use only one domain name "[NEWID]". this fixes a possible problem when downloading covers and using newid.ini and multisource. -added install wad option to nand emulation settings menu. I know you can do it via file explorer but this makes it easier for newbies to find. plus you can select which nand to install to. -fixed extract game saves. -fixed extract nand and install GC game by stopping music and controller input while doing these functions. -Install wii game is broke. added a error msg stating this and keeping users from using it. funny the code is almost identical to usbloader gx which works and wiiflow doesn't. -now showing all btns on game selected screen. if wiiflow is locked a error msg appears stating this. -changed makeDir to make the whole path not just one folder. thanks to usbloader gx code. -added .ciso extension to gamecube list maker so you can use them with nintendont.
2016-12-01 01:05:39 +01:00
_initCF();
}
_showPaths();
}
else if (m_btnMgr.selected(m_configBtn2))
{
_hidePaths();
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_flat_covers").c_str());
if(strlen(path) > 0)
{
m_cfg.setString("GENERAL", "dir_flat_covers", path);
m_picDir = path;
-updated NIN_CFG_VERSION to 7 for Nintendont argsboot and added triforce arcade option to game settings menu. tested and working. -fixed wii u widescreen option in game config menu. should properly work now. thanks pBullet! -added a fix for coverflow titles display when coverflow has 3 or more rows. for some reason 3 or more rows caused the title to display improperly. -removed **disabled** message from source menu. no need for it - was a stupid idea. if you don't want it to display then remove it from your source menu or don't add it. when a view is disabled in wiiflow_lite.ini then only that view icon is disabled from showing on the main menu screen. -removed titles.ini which wasn't really used except for displaying the return to channel in settings. I googled it and nothing really showed up. it seemed to be the same as custom_titles.ini - it seemed useless. -removed cacheing sourceflow list. the list is never big enuff to worry about cacheing. plus if you add or remove source btns you won't have to reload cache for the changes to take effect. -removed max_source_btns from wiiflow_lite.ini - added code to get highest source menu btn so now source menu can have as many buttons as you like. -removed Manage Languages Menu - restored option to just change wiiflow language. no need for downloading languages and the google link didn't work anyway. when i make a pack all the languages will be included. -added flat cover options for sourceflow and homebrew view. can be turned on/off via their config menu's accessed via 'HOME' btn. -added config menu for homebrew view - press 'HOME' btn while in homebrew view to access it. config menu options are - switch apps partition, adjust coverflow, smallbox on/off, and flat covers on/off. -updated config menu for source menu/flow. options include - sourceflow on/off, adjust coverflow, smallbox on/off, flat covers on/off, and for source menu only - multisource on/off. -added coverflow layouts/versions for individual plugins - which means each plugin can have its own coverflow layout without affecting the others. -set HQ cover to default to ON -made it so coverflow doesn't reload every time you access another menu or change favorites or whatever. -added error messages to game and app launching if any of the bin files needed for launching are missing. previously whenever these errors occurred wiiflow would just exit without the user knowing why. Now the error message should display before exit so the user has an idea what went wrong. had to move cleanup() back some for the errors to show. hopefully that doesn't cause out of mem issues for users with large game collections. -added error messages to game config menu. now all config options will show but if you can't use it then a error shows telling you. such as 'use neek2o' will be available but if you set it to on and neek2o isn't installed then an error message shows. added error msgs for extracting and flashing saves too. -added show_mem=yes/no option to wiiflow_lite.ini under [DEBUG]. manually edit wiiflow_lite.ini to turn it on/off. if set to 'yes' wiiflow will show how much free mem is available on screen. no need to compile wiiflow for this option anymore. -cleaned up some of the boot up code. -starting a random game - just hold 'B' and press '-'. no longer press'B' on config or question mark icon and no need to allow it in wiiflow_lite.ini
2016-11-07 16:06:00 +01:00
//m_refreshGameList = true;
-fixed displaying errors on source menu -removed vipatch, country patch, private server and cheats defaults from wiiflow.ini. no need for default/global setting for those options. they all default to off internally in wiiflow. -now on file explorer menu pressing home btn returns you to device select so you don't have to keep backing up to get back to devices. -fixed a few minor problems with game configs, especially gc games. now all game config options should work properly. -now using bitwise operators and expressions on m_current_view to control which sources are selected. no more source= under each domain. just sources= under GENERAL. -replaced ocarina option from main settings pg3 with channels type option. no need for a global/default ocarina setting. channels type allows you to select real, emu, or both channels types for channels coverflow. which means no more pressing B on config icon to cycle thru the choices. -fixed a minor bug when downloading covers -changed newid.ini to use only one domain name "[NEWID]". this fixes a possible problem when downloading covers and using newid.ini and multisource. -added install wad option to nand emulation settings menu. I know you can do it via file explorer but this makes it easier for newbies to find. plus you can select which nand to install to. -fixed extract game saves. -fixed extract nand and install GC game by stopping music and controller input while doing these functions. -Install wii game is broke. added a error msg stating this and keeping users from using it. funny the code is almost identical to usbloader gx which works and wiiflow doesn't. -now showing all btns on game selected screen. if wiiflow is locked a error msg appears stating this. -changed makeDir to make the whole path not just one folder. thanks to usbloader gx code. -added .ciso extension to gamecube list maker so you can use them with nintendont.
2016-12-01 01:05:39 +01:00
_initCF();
}
_showPaths();
}
else if (m_btnMgr.selected(m_configBtn3))
{
_hidePaths();
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_custom_banners").c_str());
if(strlen(path) > 0)
{
m_cfg.setString("GENERAL", "dir_custom_banners", path);
m_customBnrDir = path;
}
_showPaths();
}
else if (m_btnMgr.selected(m_configBtn4))
{
_hidePaths();
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_banner_cache").c_str());
if(strlen(path) > 0)
{
m_cfg.setString("GENERAL", "dir_banner_cache", path);
m_bnrCacheDir = path;
}
_showPaths();
}
}
else if (BTN_A_PRESSED && paths_curPage == 2)
{
if (m_btnMgr.selected(m_configBtn1))
{
_hidePaths();
currentPartition = m_cfg.getInt(WII_DOMAIN, "partition", USB1);
path = _FolderExplorer(fmt(wii_games_dir, DeviceName[currentPartition]));
2021-11-13 01:11:42 +01:00
if(strchr(path, '/') != NULL)// path includes a folder and not just sd: or usb:
{
2021-11-13 01:11:42 +01:00
if(strncmp(path, "sd:", 3) == 0)
m_cfg.setInt(WII_DOMAIN, "partition", 0);
else
{
const char *partval = &path[3];
m_cfg.setInt(WII_DOMAIN, "partition", atoi(partval));
}
string tmpPath = "%s" + string(strchr(path, ':'));
m_cfg.setString(WII_DOMAIN, "wii_games_dir", tmpPath);
2021-11-13 01:11:42 +01:00
memset(wii_games_dir, 0, sizeof(wii_games_dir));
strncpy(wii_games_dir, tmpPath.c_str(), sizeof(wii_games_dir) - 1);
m_cfg.setBool(WII_DOMAIN, "update_cache", true);
-fixed displaying errors on source menu -removed vipatch, country patch, private server and cheats defaults from wiiflow.ini. no need for default/global setting for those options. they all default to off internally in wiiflow. -now on file explorer menu pressing home btn returns you to device select so you don't have to keep backing up to get back to devices. -fixed a few minor problems with game configs, especially gc games. now all game config options should work properly. -now using bitwise operators and expressions on m_current_view to control which sources are selected. no more source= under each domain. just sources= under GENERAL. -replaced ocarina option from main settings pg3 with channels type option. no need for a global/default ocarina setting. channels type allows you to select real, emu, or both channels types for channels coverflow. which means no more pressing B on config icon to cycle thru the choices. -fixed a minor bug when downloading covers -changed newid.ini to use only one domain name "[NEWID]". this fixes a possible problem when downloading covers and using newid.ini and multisource. -added install wad option to nand emulation settings menu. I know you can do it via file explorer but this makes it easier for newbies to find. plus you can select which nand to install to. -fixed extract game saves. -fixed extract nand and install GC game by stopping music and controller input while doing these functions. -Install wii game is broke. added a error msg stating this and keeping users from using it. funny the code is almost identical to usbloader gx which works and wiiflow doesn't. -now showing all btns on game selected screen. if wiiflow is locked a error msg appears stating this. -changed makeDir to make the whole path not just one folder. thanks to usbloader gx code. -added .ciso extension to gamecube list maker so you can use them with nintendont.
2016-12-01 01:05:39 +01:00
if(m_current_view & COVERFLOW_WII)
-updated NIN_CFG_VERSION to 7 for Nintendont argsboot and added triforce arcade option to game settings menu. tested and working. -fixed wii u widescreen option in game config menu. should properly work now. thanks pBullet! -added a fix for coverflow titles display when coverflow has 3 or more rows. for some reason 3 or more rows caused the title to display improperly. -removed **disabled** message from source menu. no need for it - was a stupid idea. if you don't want it to display then remove it from your source menu or don't add it. when a view is disabled in wiiflow_lite.ini then only that view icon is disabled from showing on the main menu screen. -removed titles.ini which wasn't really used except for displaying the return to channel in settings. I googled it and nothing really showed up. it seemed to be the same as custom_titles.ini - it seemed useless. -removed cacheing sourceflow list. the list is never big enuff to worry about cacheing. plus if you add or remove source btns you won't have to reload cache for the changes to take effect. -removed max_source_btns from wiiflow_lite.ini - added code to get highest source menu btn so now source menu can have as many buttons as you like. -removed Manage Languages Menu - restored option to just change wiiflow language. no need for downloading languages and the google link didn't work anyway. when i make a pack all the languages will be included. -added flat cover options for sourceflow and homebrew view. can be turned on/off via their config menu's accessed via 'HOME' btn. -added config menu for homebrew view - press 'HOME' btn while in homebrew view to access it. config menu options are - switch apps partition, adjust coverflow, smallbox on/off, and flat covers on/off. -updated config menu for source menu/flow. options include - sourceflow on/off, adjust coverflow, smallbox on/off, flat covers on/off, and for source menu only - multisource on/off. -added coverflow layouts/versions for individual plugins - which means each plugin can have its own coverflow layout without affecting the others. -set HQ cover to default to ON -made it so coverflow doesn't reload every time you access another menu or change favorites or whatever. -added error messages to game and app launching if any of the bin files needed for launching are missing. previously whenever these errors occurred wiiflow would just exit without the user knowing why. Now the error message should display before exit so the user has an idea what went wrong. had to move cleanup() back some for the errors to show. hopefully that doesn't cause out of mem issues for users with large game collections. -added error messages to game config menu. now all config options will show but if you can't use it then a error shows telling you. such as 'use neek2o' will be available but if you set it to on and neek2o isn't installed then an error message shows. added error msgs for extracting and flashing saves too. -added show_mem=yes/no option to wiiflow_lite.ini under [DEBUG]. manually edit wiiflow_lite.ini to turn it on/off. if set to 'yes' wiiflow will show how much free mem is available on screen. no need to compile wiiflow for this option anymore. -cleaned up some of the boot up code. -starting a random game - just hold 'B' and press '-'. no longer press'B' on config or question mark icon and no need to allow it in wiiflow_lite.ini
2016-11-07 16:06:00 +01:00
m_refreshGameList = true;
}
_showPaths();
}
else if (m_btnMgr.selected(m_configBtn2))
{
_hidePaths();
currentPartition = m_cfg.getInt(GC_DOMAIN, "partition", USB1);
path = _FolderExplorer(fmt(gc_games_dir, DeviceName[currentPartition]));
2021-11-13 01:11:42 +01:00
if(strchr(path, '/') != NULL)// path includes a folder and not just sd: or usb:
{
2021-11-13 01:11:42 +01:00
if(strncmp(path, "sd:", 3) == 0)
m_cfg.setInt(GC_DOMAIN, "partition", 0);
else
{
//might add error check to make sure its first partition and FAT only
const char *partval = &path[3];
m_cfg.setInt(GC_DOMAIN, "partition", atoi(partval));
}
string tmpPath = "%s" + string(strchr(path, ':'));
m_cfg.setString(GC_DOMAIN, "gc_games_dir", tmpPath);
2021-11-13 01:11:42 +01:00
memset(gc_games_dir, 0, sizeof(gc_games_dir));
strncpy(gc_games_dir, tmpPath.c_str(), sizeof(gc_games_dir) - 1);
m_cfg.setBool(GC_DOMAIN, "update_cache", true);
-fixed displaying errors on source menu -removed vipatch, country patch, private server and cheats defaults from wiiflow.ini. no need for default/global setting for those options. they all default to off internally in wiiflow. -now on file explorer menu pressing home btn returns you to device select so you don't have to keep backing up to get back to devices. -fixed a few minor problems with game configs, especially gc games. now all game config options should work properly. -now using bitwise operators and expressions on m_current_view to control which sources are selected. no more source= under each domain. just sources= under GENERAL. -replaced ocarina option from main settings pg3 with channels type option. no need for a global/default ocarina setting. channels type allows you to select real, emu, or both channels types for channels coverflow. which means no more pressing B on config icon to cycle thru the choices. -fixed a minor bug when downloading covers -changed newid.ini to use only one domain name "[NEWID]". this fixes a possible problem when downloading covers and using newid.ini and multisource. -added install wad option to nand emulation settings menu. I know you can do it via file explorer but this makes it easier for newbies to find. plus you can select which nand to install to. -fixed extract game saves. -fixed extract nand and install GC game by stopping music and controller input while doing these functions. -Install wii game is broke. added a error msg stating this and keeping users from using it. funny the code is almost identical to usbloader gx which works and wiiflow doesn't. -now showing all btns on game selected screen. if wiiflow is locked a error msg appears stating this. -changed makeDir to make the whole path not just one folder. thanks to usbloader gx code. -added .ciso extension to gamecube list maker so you can use them with nintendont.
2016-12-01 01:05:39 +01:00
if(m_current_view & COVERFLOW_GAMECUBE)
-updated NIN_CFG_VERSION to 7 for Nintendont argsboot and added triforce arcade option to game settings menu. tested and working. -fixed wii u widescreen option in game config menu. should properly work now. thanks pBullet! -added a fix for coverflow titles display when coverflow has 3 or more rows. for some reason 3 or more rows caused the title to display improperly. -removed **disabled** message from source menu. no need for it - was a stupid idea. if you don't want it to display then remove it from your source menu or don't add it. when a view is disabled in wiiflow_lite.ini then only that view icon is disabled from showing on the main menu screen. -removed titles.ini which wasn't really used except for displaying the return to channel in settings. I googled it and nothing really showed up. it seemed to be the same as custom_titles.ini - it seemed useless. -removed cacheing sourceflow list. the list is never big enuff to worry about cacheing. plus if you add or remove source btns you won't have to reload cache for the changes to take effect. -removed max_source_btns from wiiflow_lite.ini - added code to get highest source menu btn so now source menu can have as many buttons as you like. -removed Manage Languages Menu - restored option to just change wiiflow language. no need for downloading languages and the google link didn't work anyway. when i make a pack all the languages will be included. -added flat cover options for sourceflow and homebrew view. can be turned on/off via their config menu's accessed via 'HOME' btn. -added config menu for homebrew view - press 'HOME' btn while in homebrew view to access it. config menu options are - switch apps partition, adjust coverflow, smallbox on/off, and flat covers on/off. -updated config menu for source menu/flow. options include - sourceflow on/off, adjust coverflow, smallbox on/off, flat covers on/off, and for source menu only - multisource on/off. -added coverflow layouts/versions for individual plugins - which means each plugin can have its own coverflow layout without affecting the others. -set HQ cover to default to ON -made it so coverflow doesn't reload every time you access another menu or change favorites or whatever. -added error messages to game and app launching if any of the bin files needed for launching are missing. previously whenever these errors occurred wiiflow would just exit without the user knowing why. Now the error message should display before exit so the user has an idea what went wrong. had to move cleanup() back some for the errors to show. hopefully that doesn't cause out of mem issues for users with large game collections. -added error messages to game config menu. now all config options will show but if you can't use it then a error shows telling you. such as 'use neek2o' will be available but if you set it to on and neek2o isn't installed then an error message shows. added error msgs for extracting and flashing saves too. -added show_mem=yes/no option to wiiflow_lite.ini under [DEBUG]. manually edit wiiflow_lite.ini to turn it on/off. if set to 'yes' wiiflow will show how much free mem is available on screen. no need to compile wiiflow for this option anymore. -cleaned up some of the boot up code. -starting a random game - just hold 'B' and press '-'. no longer press'B' on config or question mark icon and no need to allow it in wiiflow_lite.ini
2016-11-07 16:06:00 +01:00
m_refreshGameList = true;
}
_showPaths();
}
else if (m_btnMgr.selected(m_configBtn3))
{
_hidePaths();
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_music").c_str());
if(strlen(path) > 0)
{
m_cfg.setString("GENERAL", "dir_music", path);
m_musicDir = path;
MusicPlayer.Init(m_cfg, m_musicDir, fmt("%s/music", m_themeDataDir.c_str()));
m_music_info = m_cfg.getBool("GENERAL", "display_music_info", false);
}
_showPaths();
}
else if (m_btnMgr.selected(m_configBtn4))
{
_hidePaths();
path = _FolderExplorer(m_cfg.getString("GENERAL", "dir_wiitdb").c_str());
if(strlen(path) > 0)
{
m_cfg.setString("GENERAL", "dir_wiitdb", path);
m_wiiTDBDir = path;
}
_showPaths();
}
}
}
_hidePaths();
}
void CMenu::_initPathsMenu()
{
_addUserLabels(m_pathsLblUser, ARRAY_SIZE(m_pathsLblUser), "PATHS");
m_pathsBg = _texture("PATHS/BG", "texture", theme.bg, false);
m_pathsLblTitle = _addLabel("PATHS/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
m_pathsLblPage = _addLabel("PATHS/PAGE_BTN", theme.btnFont, L"", 68, 400, 104, 48, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
m_pathsBtnPageM = _addPicButton("PATHS/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 48, 48);
m_pathsBtnPageP = _addPicButton("PATHS/PAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 172, 400, 48, 48);
m_pathsBtnBack = _addButton("PATHS/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
_setHideAnim(m_pathsLblTitle, "PATHS/TITLE", 0, 0, -2.f, 0.f);
_setHideAnim(m_pathsBtnBack, "PATHS/BACK_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_pathsLblPage, "PATHS/PAGE_BTN", 0, 0, 1.f, -1.f);
_setHideAnim(m_pathsBtnPageM, "PATHS/PAGE_MINUS", 0, 0, 1.f, -1.f);
_setHideAnim(m_pathsBtnPageP, "PATHS/PAGE_PLUS", 0, 0, 1.f, -1.f);
_hidePaths(true);
_textPaths();
}
void CMenu::_textPaths(void)
{
m_btnMgr.setText(m_pathsLblTitle, _t("cfgd4", L"Path Manager"));
m_btnMgr.setText(m_pathsBtnBack, _t("cfg10", L"Back"));
}