mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 03:11:58 +01:00
-Added parental lock to categories menu - issue 156. Now with lock on you can't set a category to hidden or un-hide a hidden category. Also with lock on you can't access categories per game.
This commit is contained in:
parent
32b19866c8
commit
0c9ea8ae10
@ -302,9 +302,18 @@ void CMenu::_CategorySettings(bool fromGameSet)
|
|||||||
{
|
{
|
||||||
if(m_btnMgr.selected(m_categoryBtnClear))
|
if(m_btnMgr.selected(m_categoryBtnClear))
|
||||||
{
|
{
|
||||||
m_categories.at(0) = '1';
|
bool hiddenCat = false;
|
||||||
for(int j = 1; j < m_max_categories; ++j)
|
for(int j = 1; j < m_max_categories; ++j)
|
||||||
|
{
|
||||||
|
if(m_categories.at(j) == '2' && m_locked)
|
||||||
|
{
|
||||||
|
hiddenCat = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
m_categories.at(j) = '0';
|
m_categories.at(j) = '0';
|
||||||
|
}
|
||||||
|
if(!hiddenCat)
|
||||||
|
m_categories.at(0) = '1';
|
||||||
_updateCheckboxes();
|
_updateCheckboxes();
|
||||||
}
|
}
|
||||||
for(u8 i = 1; i < 11; ++i)
|
for(u8 i = 1; i < 11; ++i)
|
||||||
@ -327,6 +336,10 @@ void CMenu::_CategorySettings(bool fromGameSet)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(m_locked && m_categories.at(j) == '2')
|
||||||
|
m_categories.at(j) = '1';
|
||||||
|
else if(m_locked && m_categories.at(j) == '1')
|
||||||
|
m_categories.at(j) = '2';
|
||||||
m_categories.at(j) = m_categories.at(j) == '0' ? '1' : m_categories.at(j) == '1' ? '2' : m_categories.at(j) == '2' ? '3' : '0';
|
m_categories.at(j) = m_categories.at(j) == '0' ? '1' : m_categories.at(j) == '1' ? '2' : m_categories.at(j) == '2' ? '3' : '0';
|
||||||
if(m_categories.at(0) == '1' && m_categories.at(j) != '0')
|
if(m_categories.at(0) == '1' && m_categories.at(j) != '0')
|
||||||
m_categories.at(0) = '0';
|
m_categories.at(0) = '0';
|
||||||
|
@ -695,7 +695,7 @@ void CMenu::_gameSettings(void)
|
|||||||
m_gcfg2.setBool(id, "debugger", true);
|
m_gcfg2.setBool(id, "debugger", true);
|
||||||
_showGameSettings();
|
_showGameSettings();
|
||||||
}
|
}
|
||||||
else if (m_btnMgr.selected(m_gameSettingsBtnCategoryMain))
|
else if (m_btnMgr.selected(m_gameSettingsBtnCategoryMain) && !m_locked)
|
||||||
{
|
{
|
||||||
_hideGameSettings();
|
_hideGameSettings();
|
||||||
_CategorySettings(true);
|
_CategorySettings(true);
|
||||||
|
@ -407,7 +407,7 @@ void CMenu::_game(bool launch)
|
|||||||
m_gameSelected = true;
|
m_gameSelected = true;
|
||||||
startGameSound = 1;
|
startGameSound = 1;
|
||||||
}
|
}
|
||||||
if(BTN_B_PRESSED && (m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff)))
|
if(BTN_B_PRESSED && !m_locked && (m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff)))
|
||||||
{
|
{
|
||||||
_hideGame();
|
_hideGame();
|
||||||
m_banner.SetShowBanner(false);
|
m_banner.SetShowBanner(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user