mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-24 19:01:56 +01:00
- Categories Update. re-added numcategories so you can have less than 20 categories if you want. re-added categories per view (usb, dml,channels, brew,etc..). added press 'B' on fav icon on game selected screen to go directly to game categories just like pressing 'B' on fav icon on main menu. moved 'All' button to lower left. replaced on and off buttons with check boxes - don't worry I already compressed them and they only add 4k to WiiFlow. And a few other minor changes.
This commit is contained in:
parent
091e9bcb1e
commit
c97818c8aa
@ -22,6 +22,7 @@ bool CButtonsMgr::init(CVideo &vid)
|
||||
m_rumbleEnabled = false;
|
||||
m_soundVolume = 0xFF;
|
||||
m_noclick = false;
|
||||
m_nohover = false;
|
||||
m_vid = vid;
|
||||
soundInit();
|
||||
|
||||
@ -231,7 +232,8 @@ void CButtonsMgr::mouse(int chan, int x, int y)
|
||||
if (s != m_selected[chan])
|
||||
{
|
||||
if (m_soundVolume > 0 && !!but.hoverSound)
|
||||
but.hoverSound->Play(m_soundVolume);
|
||||
if(!m_nohover)
|
||||
but.hoverSound->Play(m_soundVolume);
|
||||
if (m_rumbleEnabled)
|
||||
{
|
||||
m_rumble[chan] = 4;
|
||||
@ -314,6 +316,11 @@ void CButtonsMgr::down(void)
|
||||
}
|
||||
}
|
||||
|
||||
void CButtonsMgr::noHover(bool nohover)
|
||||
{
|
||||
m_nohover = nohover;
|
||||
}
|
||||
|
||||
void CButtonsMgr::noClick(bool noclick)
|
||||
{
|
||||
m_noclick = noclick;
|
||||
|
@ -57,6 +57,7 @@ public:
|
||||
void draw(void);
|
||||
void tick(void);
|
||||
void noClick(bool noclick = false);
|
||||
void noHover(bool nohover = false);
|
||||
void click(u32 id = (u32)-1);
|
||||
bool selected(u32 button = (u32)-1);
|
||||
void setRumble(int, bool wii = false, bool gc = false);
|
||||
@ -147,6 +148,7 @@ private:
|
||||
SmartGuiSound m_sndClick;
|
||||
u8 m_soundVolume;
|
||||
bool m_noclick;
|
||||
bool m_nohover;
|
||||
CVideo m_vid;
|
||||
private:
|
||||
void _drawBtn(const SButton &b, bool selected, bool click);
|
||||
|
@ -101,7 +101,8 @@ extern const u8 butzhcnon_png[];
|
||||
extern const u8 butzhcnons_png[];
|
||||
extern const u8 butzhcnoff_png[];
|
||||
extern const u8 butzhcnoffs_png[];
|
||||
|
||||
extern const u8 checkbox_png[];
|
||||
extern const u8 checkboxs_png[];
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -116,7 +117,6 @@ CMenu::CMenu(CVideo &vid) :
|
||||
m_thrdStepLen = 0.f;
|
||||
m_locked = false;
|
||||
m_favorites = false;
|
||||
m_category = 0;
|
||||
m_networkInit = false;
|
||||
m_thrdNetwork = false;
|
||||
m_mutex = 0;
|
||||
@ -418,8 +418,7 @@ void CMenu::init(void)
|
||||
|
||||
if (m_cfg.getBool("GENERAL", "favorites_on_startup", false))
|
||||
m_favorites = m_cfg.getBool(domain, "favorites", false);
|
||||
m_category = m_cat.getInt(domain, "category", 0);
|
||||
m_max_categories = m_cat.getInt(domain, "numcategories", 12);
|
||||
m_max_categories = m_cat.getInt("GENERAL", "numcategories", 21);
|
||||
|
||||
m_cfg.setString("GAMERCARD", "gamercards", "wiinnertag|dutag");
|
||||
m_cfg.getString("GAMERCARD", "wiinnertag_url", WIINNERTAG_URL);
|
||||
@ -940,6 +939,15 @@ void CMenu::_buildMenus(void)
|
||||
theme.btnZHCNOffs.fromPNG(butzhcnoffs_png);
|
||||
theme.btnZHCNOffs = _texture(theme.texSet, "GENERAL", "button_zhcn_off_selected", theme.btnZHCNOffs);
|
||||
|
||||
theme.checkboxoff.fromPNG(checkbox_png);
|
||||
theme.checkboxoff = _texture(theme.texSet, "GENERAL", "checkbox_off", theme.checkboxoff);
|
||||
theme.checkboxoffs.fromPNG(checkbox_png);
|
||||
theme.checkboxoffs = _texture(theme.texSet, "GENERAL", "checkbox_off_selected", theme.checkboxoffs);
|
||||
theme.checkboxon.fromPNG(checkboxs_png);
|
||||
theme.checkboxon = _texture(theme.texSet, "GENERAL", "checkbox_on", theme.checkboxon);
|
||||
theme.checkboxons.fromPNG(checkboxs_png);
|
||||
theme.checkboxons = _texture(theme.texSet, "GENERAL", "checkbox_on_selected", theme.checkboxons);
|
||||
|
||||
theme.pbarTexL.fromPNG(pbarleft_png);
|
||||
theme.pbarTexL = _texture(theme.texSet, "GENERAL", "progressbar_texture_left", theme.pbarTexL);
|
||||
theme.pbarTexR.fromPNG(pbarright_png);
|
||||
@ -1406,7 +1414,7 @@ void CMenu::_initCF(void)
|
||||
{
|
||||
Config m_dump;
|
||||
const char *domain = _domainFromView();
|
||||
const char *catviews = m_cat.getString("GENERAL", "categories", "").c_str();
|
||||
const char *catviews = m_cat.getString(domain, "categories", "100000000000000000000").c_str();
|
||||
|
||||
m_cf.clear();
|
||||
m_cf.reserve(m_gameList.size());
|
||||
@ -1423,21 +1431,21 @@ void CMenu::_initCF(void)
|
||||
|
||||
string id = string((const char *)m_gameList[i].hdr.id, m_current_view == COVERFLOW_CHANNEL ? 4 : 6);
|
||||
string idcats = m_cat.getString("CATEGORIES", id, "").c_str();
|
||||
if (idcats.length() == 12)
|
||||
if (idcats.length() < 21 && idcats.length() > 0)
|
||||
{
|
||||
idcats.append("00000000");
|
||||
idcats.append((21-idcats.length()), '0');
|
||||
m_cat.setString("CATEGORIES", id, idcats);
|
||||
}
|
||||
if ((!m_favorites || m_gcfg1.getBool("FAVORITES", id, false)) && (!m_locked || !m_gcfg1.getBool("ADULTONLY", id, false)) && !m_gcfg1.getBool("HIDDEN", id, false))
|
||||
if ((!m_favorites || m_gcfg1.getBool("FAVORITES", id, false)) && (!m_locked || !m_gcfg1.getBool("ADULTONLY", id, false)))
|
||||
{
|
||||
if (catviews[0] == '0')
|
||||
{
|
||||
const char *idcats = m_cat.getString("CATEGORIES", id, "").c_str();
|
||||
if (strlen(idcats) != 20) continue;
|
||||
if (strlen(idcats) == 0) continue;
|
||||
else
|
||||
{
|
||||
bool idinacat=0;
|
||||
for (u32 j = 1; j<20; ++j) if (catviews[j] == '1' && idcats[j] == '1') idinacat=1;
|
||||
for (u32 j = 1; j<m_max_categories; ++j) if (catviews[j] == '1' && idcats[j] == '1') idinacat=1;
|
||||
if (!idinacat) continue;
|
||||
}
|
||||
}
|
||||
|
@ -488,9 +488,6 @@ private:
|
||||
u32 m_gameSettingsBtnCheat;
|
||||
u32 m_gameSettingsLblCategoryMain;
|
||||
u32 m_gameSettingsBtnCategoryMain;
|
||||
u32 m_gameSettingsLblCategory[12];
|
||||
u32 m_gameSettingsBtnCategory[12];
|
||||
u32 m_gameCategoryPage;
|
||||
u32 m_gameSettingsPage;
|
||||
u32 m_gameSettingsLblGameIOS;
|
||||
u32 m_gameSettingsLblIOS;
|
||||
@ -547,12 +544,12 @@ private:
|
||||
u32 m_categoryBtnPageP;
|
||||
u32 m_categoryBtnBack;
|
||||
u32 m_categoryLblTitle;
|
||||
u32 m_categoryLblCat[20];
|
||||
u32 m_categoryBtnCat[20];
|
||||
u32 m_categoryBtnCats[20];
|
||||
u32 m_categoryLblCat[21];
|
||||
u32 m_categoryBtn[21];
|
||||
u32 m_categoryBtnCat[21];
|
||||
u32 m_categoryBtnCats[21];
|
||||
u32 m_categoryLblUser[4];
|
||||
u8 m_max_categories;
|
||||
u8 m_category;
|
||||
// Zones
|
||||
SZone m_mainPrevZone;
|
||||
SZone m_mainNextZone;
|
||||
@ -743,7 +740,10 @@ private:
|
||||
STexture btnZHCNOns;
|
||||
STexture btnZHCNOff;
|
||||
STexture btnZHCNOffs;
|
||||
|
||||
STexture checkboxoff;
|
||||
STexture checkboxoffs;
|
||||
STexture checkboxon;
|
||||
STexture checkboxons;
|
||||
STexture pbarTexL;
|
||||
STexture pbarTexR;
|
||||
STexture pbarTexC;
|
||||
@ -862,6 +862,7 @@ private:
|
||||
void _showCFTheme(u32 curParam, int version, bool wide);
|
||||
void _showGameSettings(void);
|
||||
void _showCheatDownload(void);
|
||||
void _updateCheckboxes(void);
|
||||
void _setBg(const STexture &tex, const STexture &lqTex);
|
||||
void _updateBg(void);
|
||||
void _drawBg(void);
|
||||
|
@ -3,9 +3,10 @@
|
||||
#include <string.h>
|
||||
#include <gccore.h>
|
||||
|
||||
u8 m_categories[20];
|
||||
u8 m_categories[21];
|
||||
u32 C_curPage;
|
||||
bool gameSet;
|
||||
u8 lastBtn;
|
||||
|
||||
void CMenu::_hideCategorySettings(bool instant)
|
||||
{
|
||||
@ -17,55 +18,64 @@ void CMenu::_hideCategorySettings(bool instant)
|
||||
for (u32 i = 0; i < ARRAY_SIZE(m_categoryLblUser); ++i)
|
||||
if (m_categoryLblUser[i] != -1u) m_btnMgr.hide(m_categoryLblUser[i], instant);
|
||||
|
||||
for (int i=0; i<20; ++i)
|
||||
for (int i=0; i<21; ++i)
|
||||
{
|
||||
m_btnMgr.hide(m_categoryLblCat[i]);
|
||||
m_btnMgr.hide(m_categoryBtnCat[i]);
|
||||
m_btnMgr.hide(m_categoryBtnCats[i]);
|
||||
m_btnMgr.hide(m_categoryBtn[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void CMenu::_showCategorySettings(void)
|
||||
{
|
||||
_setBg(m_categoryBg, m_categoryBg);
|
||||
for (u32 i = 0; i < ARRAY_SIZE(m_categoryLblUser); ++i) if (m_categoryLblUser[i] != -1u) m_btnMgr.show(m_categoryLblUser[i]);
|
||||
m_btnMgr.show(m_categoryLblTitle);
|
||||
m_btnMgr.show(m_categoryBtnBack);
|
||||
m_btnMgr.setText(m_categoryLblPage, wfmt(L"%i / 2", C_curPage));
|
||||
m_btnMgr.show(m_categoryLblPage);
|
||||
m_btnMgr.show(m_categoryBtnPageM);
|
||||
m_btnMgr.show(m_categoryBtnPageP);
|
||||
|
||||
for (u32 i = 0; i < ARRAY_SIZE(m_categoryLblUser); ++i) if (m_categoryLblUser[i] != -1u) m_btnMgr.show(m_categoryLblUser[i]);
|
||||
if (m_max_categories > 10)
|
||||
{
|
||||
m_btnMgr.setText(m_categoryLblPage, wfmt(L"%i / 2", C_curPage));
|
||||
m_btnMgr.show(m_categoryLblPage);
|
||||
m_btnMgr.show(m_categoryBtnPageM);
|
||||
m_btnMgr.show(m_categoryBtnPageP);
|
||||
}
|
||||
_updateCheckboxes();
|
||||
}
|
||||
|
||||
void CMenu::_updateCheckboxes(void)
|
||||
{
|
||||
for (int i=0; i<21; ++i)
|
||||
{
|
||||
m_btnMgr.hide(m_categoryBtn[i]);
|
||||
m_btnMgr.hide(m_categoryLblCat[i]);
|
||||
}
|
||||
string id(m_cf.getId());
|
||||
const char *catflags;
|
||||
if (gameSet) catflags = m_cat.getString("CATEGORIES", id, "").c_str();
|
||||
else catflags = m_cat.getString("GENERAL", "categories", "10000000000000000000").c_str();
|
||||
else catflags = m_cat.getString(_domainFromView(), "categories", "100000000000000000000").c_str();
|
||||
memset(&m_categories, '0', sizeof(m_categories));
|
||||
if (strlen(catflags) == sizeof(m_categories)) memcpy(&m_categories, catflags, sizeof(m_categories));
|
||||
|
||||
if (C_curPage == 1)
|
||||
{
|
||||
for (int i = 0; i < 10; ++i)
|
||||
int j = 11;
|
||||
if (m_max_categories < 11) j = m_max_categories;
|
||||
for (int i = 0; i < j; ++i)
|
||||
{
|
||||
if (i == 0 && gameSet) continue;
|
||||
m_btnMgr.show(m_categoryLblCat[i]);
|
||||
if (catflags[i] == '1') m_btnMgr.show(m_categoryBtnCats[i]);
|
||||
else m_btnMgr.show(m_categoryBtnCat[i]);
|
||||
m_btnMgr.hide(m_categoryLblCat[i+10]);
|
||||
m_btnMgr.hide(m_categoryBtnCat[i+10]);
|
||||
m_btnMgr.hide(m_categoryBtnCats[i+10]);
|
||||
if (catflags[i] == '1') m_categoryBtn[i] = m_categoryBtnCats[i];
|
||||
else m_categoryBtn[i] = m_categoryBtnCat[i];
|
||||
m_btnMgr.show(m_categoryBtn[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 10; i < 20; ++i)
|
||||
for (int i = 11; i < m_max_categories; ++i)
|
||||
{
|
||||
m_btnMgr.show(m_categoryLblCat[i]);
|
||||
if (catflags[i] == '1') m_btnMgr.show(m_categoryBtnCats[i]);
|
||||
else m_btnMgr.show(m_categoryBtnCat[i]);
|
||||
m_btnMgr.hide(m_categoryLblCat[i-10]);
|
||||
m_btnMgr.hide(m_categoryBtnCat[i-10]);
|
||||
m_btnMgr.hide(m_categoryBtnCats[i-10]);
|
||||
if (catflags[i] == '1') m_categoryBtn[i] = m_categoryBtnCats[i];
|
||||
else m_categoryBtn[i] = m_categoryBtnCat[i];
|
||||
m_btnMgr.show(m_categoryBtn[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -74,51 +84,55 @@ void CMenu::_CategorySettings(bool fromGameSet)
|
||||
{
|
||||
SetupInput();
|
||||
C_curPage = 1;
|
||||
gameSet = false;
|
||||
if (fromGameSet) gameSet=true;
|
||||
gameSet = fromGameSet;
|
||||
_showCategorySettings();
|
||||
while (true)
|
||||
{
|
||||
_mainLoopCommon();
|
||||
if (!m_btnMgr.selected(lastBtn)) m_btnMgr.noHover(false);
|
||||
if (BTN_HOME_PRESSED || BTN_B_PRESSED)
|
||||
break;
|
||||
else if (BTN_UP_PRESSED)
|
||||
m_btnMgr.up();
|
||||
else if (BTN_DOWN_PRESSED)
|
||||
m_btnMgr.down();
|
||||
if (BTN_MINUS_PRESSED || BTN_LEFT_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_categoryBtnPageM)))
|
||||
if (((BTN_MINUS_PRESSED || BTN_LEFT_PRESSED) && m_max_categories>11) || (BTN_A_PRESSED && m_btnMgr.selected(m_categoryBtnPageM)))
|
||||
{
|
||||
lastBtn = m_categoryBtnPageM;
|
||||
m_btnMgr.noHover(true);
|
||||
C_curPage = C_curPage == 1 ? 2 : 1;
|
||||
if(BTN_LEFT_PRESSED || BTN_MINUS_PRESSED) m_btnMgr.click(m_categoryBtnPageM);
|
||||
_hideCategorySettings();
|
||||
_showCategorySettings();
|
||||
if (BTN_LEFT_PRESSED || BTN_MINUS_PRESSED) m_btnMgr.click(m_categoryBtnPageM);
|
||||
_updateCheckboxes();
|
||||
}
|
||||
else if (BTN_PLUS_PRESSED || BTN_RIGHT_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_categoryBtnPageP)))
|
||||
else if (((BTN_PLUS_PRESSED || BTN_RIGHT_PRESSED) && m_max_categories>11) || (BTN_A_PRESSED && m_btnMgr.selected(m_categoryBtnPageP)))
|
||||
{
|
||||
lastBtn = m_categoryBtnPageP;
|
||||
m_btnMgr.noHover(true);
|
||||
C_curPage = C_curPage == 1 ? 2 : 1;
|
||||
if(BTN_RIGHT_PRESSED || BTN_PLUS_PRESSED) m_btnMgr.click(m_categoryBtnPageP);
|
||||
_hideCategorySettings();
|
||||
_showCategorySettings();
|
||||
_updateCheckboxes();
|
||||
}
|
||||
if (BTN_A_PRESSED)
|
||||
{
|
||||
if (m_btnMgr.selected(m_categoryBtnBack))
|
||||
break;
|
||||
for (int i = 0; i < 20; ++i)
|
||||
for (int i = 0; i < 21; ++i)
|
||||
{
|
||||
if (m_btnMgr.selected(m_categoryBtnCat[i]) || m_btnMgr.selected(m_categoryBtnCats[i]))
|
||||
if (m_btnMgr.selected(m_categoryBtn[i]))
|
||||
{
|
||||
lastBtn = m_categoryBtn[i];
|
||||
m_btnMgr.noHover(true);
|
||||
m_categories[i] = m_categories[i] == '1' ? '0' : '1';
|
||||
if (i == 0 && m_categories[i] == '1') for (int j=1; j<20; ++j) m_categories[j] = '0';
|
||||
if (i == 0 && m_categories[i] == '1') for (int j=1; j<21; ++j) m_categories[j] = '0';
|
||||
else m_categories[0] = '0';
|
||||
char catflags[21];
|
||||
char catflags[22];
|
||||
memset(&catflags, 0, sizeof(catflags));
|
||||
memcpy(&catflags, &m_categories, sizeof(m_categories));
|
||||
string id(m_cf.getId());
|
||||
if (string (catflags) == "000000000000000000000") catflags[0] = '1';
|
||||
if (gameSet) m_cat.setString("CATEGORIES", id, catflags);
|
||||
else m_cat.setString("GENERAL", "categories", catflags);
|
||||
_hideCategorySettings();
|
||||
_showCategorySettings();
|
||||
else m_cat.setString(_domainFromView(), "categories", catflags);
|
||||
_updateCheckboxes();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -133,37 +147,42 @@ void CMenu::_initCategorySettingsMenu(CMenu::SThemeData &theme)
|
||||
m_categoryBg = _texture(theme.texSet, "CATEGORY/BG", "texture", theme.bg);
|
||||
m_categoryLblTitle = _addTitle(theme, "CATEGORY/TITLE", theme.titleFont, L"", 20, 30, 600, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnBack = _addButton(theme, "CATEGORY/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 56, theme.btnFontColor);
|
||||
m_categoryLblPage = _addLabel(theme, "CATEGORY/PAGE_BTN", theme.btnFont, L"", 76, 400, 100, 56, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_categoryBtnPageM = _addPicButton(theme, "CATEGORY/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 20, 400, 56, 56);
|
||||
m_categoryBtnPageP = _addPicButton(theme, "CATEGORY/PAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 176, 400, 56, 56);
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{ // Page 1
|
||||
m_categoryLblCat[i] = _addLabel(theme, sfmt("CATEGORY/CAT_%i", i).c_str(), theme.lblFont, L"", 125, (100+i*58), 185, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[i] = _addButton(theme, sfmt("CATEGORY/CAT_%i_BTN", i).c_str(), theme.btnFont, L"", 20, (100+i*58), 96, 48, theme.btnFontColor);
|
||||
m_categoryBtnCats[i] = _addButton(theme, sfmt("CATEGORY/CAT_%i_BTNS", i).c_str(), theme.btnFont, L"", 20, (100+i*58), 96, 48, theme.selsbtnFontColor);
|
||||
// right half
|
||||
m_categoryLblCat[i+5] = _addLabel(theme, sfmt("CATEGORY/CAT_%i", i+5).c_str(), theme.txtFont, L"", 425, (100+i*58), 185, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[i+5] = _addButton(theme, sfmt("CATEGORY/CAT_%i_BTN", i+5).c_str(), theme.btnFont, L"", 320, (100+i*58), 96, 48, theme.btnFontColor);
|
||||
m_categoryBtnCats[i+5] = _addButton(theme, sfmt("CATEGORY/CAT_%i_BTNS", i+5).c_str(), theme.btnFont, L"", 320, (100+i*58), 96, 48, theme.selsbtnFontColor);
|
||||
// Page 2
|
||||
m_categoryLblCat[i+10] = _addLabel(theme, sfmt("CATEGORY/CAT_%i", i+10).c_str(), theme.lblFont, L"", 125, (100+i*58), 185, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[i+10] = _addButton(theme, sfmt("CATEGORY/CAT_%i_BTN", i+10).c_str(), theme.btnFont, L"", 20, (100+i*58), 96, 48, theme.btnFontColor);
|
||||
m_categoryBtnCats[i+10] = _addButton(theme, sfmt("CATEGORY/CAT_%i_BTNS", i+10).c_str(), theme.btnFont, L"", 20, (100+i*58), 96, 48, theme.selsbtnFontColor);
|
||||
// right half
|
||||
m_categoryLblCat[i+15] = _addLabel(theme, sfmt("CATEGORY/CAT_%i", i+15).c_str(), theme.txtFont, L"", 425, (100+i*58), 185, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[i+15] = _addButton(theme, sfmt("CATEGORY/CAT_%i_BTN", i+15).c_str(), theme.btnFont, L"", 320, (100+i*58), 96, 48, theme.btnFontColor);
|
||||
m_categoryBtnCats[i+15] = _addButton(theme, sfmt("CATEGORY/CAT_%i_BTNS", i+15).c_str(), theme.btnFont, L"", 320, (100+i*58), 96, 48, theme.selsbtnFontColor);
|
||||
m_categoryLblPage = _addLabel(theme, "CATEGORY/PAGE_BTN", theme.btnFont, L"", 256, 400, 100, 56, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_categoryBtnPageM = _addPicButton(theme, "CATEGORY/PAGE_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 200, 400, 56, 56);
|
||||
m_categoryBtnPageP = _addPicButton(theme, "CATEGORY/PAGE_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 356, 400, 56, 56);
|
||||
m_categoryLblCat[0] = _addLabel(theme, "CATEGORY/CAT_0", theme.lblFont, L"", 85, 390, 100, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[0] = _addPicButton(theme, "CATEGORY/CAT_0_BTN", theme.checkboxoff, theme.checkboxoffs, 30, 390, 44, 48);
|
||||
m_categoryBtnCats[0] = _addPicButton(theme, "CATEGORY/CAT_0_BTNS", theme.checkboxon, theme.checkboxons, 30, 390, 44, 48);
|
||||
int j = 1;
|
||||
for (int i = 1; i < 11; i+=2)
|
||||
{ // Page 1
|
||||
m_categoryLblCat[i] = _addLabel(theme, sfmt("CATEGORY/CAT_%i", i).c_str(), theme.lblFont, L"", 85, (42+j*58), 230, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[i] = _addPicButton(theme, sfmt("CATEGORY/CAT_%i_BTN", i).c_str(), theme.checkboxoff, theme.checkboxoffs, 30, (42+j*58), 44, 48);
|
||||
m_categoryBtnCats[i] = _addPicButton(theme, sfmt("CATEGORY/CAT_%i_BTNS", i).c_str(), theme.checkboxon, theme.checkboxons, 30, (42+j*58), 44, 48);
|
||||
// right half
|
||||
m_categoryLblCat[i+1] = _addLabel(theme, sfmt("CATEGORY/CAT_%i", i+1).c_str(), theme.txtFont, L"", 380, (42+j*58), 230, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[i+1] = _addPicButton(theme, sfmt("CATEGORY/CAT_%i_BTN", i+1).c_str(), theme.checkboxoff, theme.checkboxoffs, 325, (42+j*58), 44, 48);
|
||||
m_categoryBtnCats[i+1] = _addPicButton(theme, sfmt("CATEGORY/CAT_%i_BTNS", i+1).c_str(), theme.checkboxon, theme.checkboxons, 325, (42+j*58), 44, 48);
|
||||
// Page 2
|
||||
m_categoryLblCat[i+10] = _addLabel(theme, sfmt("CATEGORY/CAT_%i", i+10).c_str(), theme.lblFont, L"", 85, (42+j*58), 230, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[i+10] = _addPicButton(theme, sfmt("CATEGORY/CAT_%i_BTN", i+10).c_str(), theme.checkboxoff, theme.checkboxoffs, 30, (42+j*58), 44, 48);
|
||||
m_categoryBtnCats[i+10] = _addPicButton(theme, sfmt("CATEGORY/CAT_%i_BTNS", i+10).c_str(), theme.checkboxon, theme.checkboxons, 30, (42+j*58), 44, 48);
|
||||
// right half
|
||||
m_categoryLblCat[i+11] = _addLabel(theme, sfmt("CATEGORY/CAT_%i", i+11).c_str(), theme.txtFont, L"", 380, (42+j*58), 230, 48, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
||||
m_categoryBtnCat[i+11] = _addPicButton(theme, sfmt("CATEGORY/CAT_%i_BTN", i+11).c_str(), theme.checkboxoff, theme.checkboxoffs, 325, (42+j*58), 44, 48);
|
||||
m_categoryBtnCats[i+11] = _addPicButton(theme, sfmt("CATEGORY/CAT_%i_BTNS", i+11).c_str(), theme.checkboxon, theme.checkboxons, 325, (42+j*58), 44, 48);
|
||||
++j;
|
||||
}
|
||||
_setHideAnim(m_categoryLblTitle, "CATEGORY/TITLE", 0, -200, 0.f, 1.f);
|
||||
_setHideAnim(m_categoryLblPage, "CATEGORY/PAGE_BTN", 0, 200, 1.f, 0.f);
|
||||
_setHideAnim(m_categoryBtnPageM, "CATEGORY/PAGE_MINUS", 0, 200, 1.f, 0.f);
|
||||
_setHideAnim(m_categoryBtnPageP, "CATEGORY/PAGE_PLUS", 0, 200, 1.f, 0.f);
|
||||
_setHideAnim(m_categoryBtnBack, "CATEGORY/BACK_BTN", 0, 200, 1.f, 0.f);
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
for (int i = 0; i < 21; ++i) {
|
||||
_setHideAnim(m_categoryBtnCat[i], sfmt("CATEGORY/CAT_%i_BTN", i).c_str(), 0, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_categoryBtnCats[i], sfmt("CATEGORY/CAT_%i_BTNS", i).c_str(), 0, 0, 1.f, 0.f);
|
||||
_setHideAnim(m_categoryLblCat[i], sfmt("CATEGORY/CAT_%i", i).c_str(), 0, 0, 1.f, 0.f);
|
||||
m_categoryBtn[i] = m_categoryBtnCat[i];
|
||||
}
|
||||
_hideCategorySettings(true);
|
||||
_textCategorySettings();
|
||||
@ -171,14 +190,12 @@ void CMenu::_initCategorySettingsMenu(CMenu::SThemeData &theme)
|
||||
|
||||
void CMenu::_textCategorySettings(void)
|
||||
{
|
||||
m_btnMgr.setText(m_categoryLblTitle, _t("cfgg17", L"Categories"));
|
||||
m_btnMgr.setText(m_categoryLblTitle, _t("", L"Select Categories"));
|
||||
m_btnMgr.setText(m_categoryBtnBack, _t("cd1", L"Back"));
|
||||
for (int i=0; i<20; ++i)
|
||||
for (int i=0; i<21; ++i)
|
||||
{
|
||||
if (i == 0) m_btnMgr.setText(m_categoryLblCat[i], _t("dl3", L"All"));
|
||||
else m_btnMgr.setText(m_categoryLblCat[i], m_cat.getWString("GENERAL", fmt("cat%d",i), wfmt(L"Category %i",i).c_str()));
|
||||
m_btnMgr.setText(m_categoryBtnCat[i], _t("off", L"OFF"));
|
||||
m_btnMgr.setText(m_categoryBtnCats[i], _t("on", L"ON"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -370,7 +370,12 @@ void CMenu::_game(bool launch)
|
||||
m_gameSelected = true;
|
||||
startGameSound = 1;
|
||||
}
|
||||
|
||||
if (BTN_B_PRESSED && (m_btnMgr.selected(m_gameBtnFavoriteOn) || m_btnMgr.selected(m_gameBtnFavoriteOff)))
|
||||
{
|
||||
_hideGame();
|
||||
_CategorySettings(true);
|
||||
_showGame();
|
||||
}
|
||||
if (BTN_HOME_PRESSED || BTN_B_PRESSED)
|
||||
{
|
||||
m_gameSound.Stop();
|
||||
|
@ -271,11 +271,7 @@ int CMenu::main(void)
|
||||
m_current_view = COVERFLOW_HOMEBREW;
|
||||
else if (BTN_RIGHT_PRESSED && show_channel)
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
if (cv != m_current_view)
|
||||
{
|
||||
m_category = m_cat.getInt(_domainFromView(), "category", 0);
|
||||
LoadView();
|
||||
}
|
||||
if (cv != m_current_view) LoadView();
|
||||
}
|
||||
if (cv == m_current_view && !m_btnMgr.selected(m_mainBtnChannel) && !m_btnMgr.selected(m_mainBtnUsb) && !m_btnMgr.selected(m_mainBtnDML) && !m_btnMgr.selected(m_mainBtnHomebrew))
|
||||
{
|
||||
@ -449,10 +445,7 @@ int CMenu::main(void)
|
||||
{
|
||||
m_cfg.setBool("NAND", "disable", !m_cfg.getBool("NAND", "disable", true));
|
||||
gprintf("EmuNand is %s\n", m_cfg.getBool("NAND", "disable", true) ? "Disabled" : "Enabled");
|
||||
|
||||
m_category = m_cat.getInt("NAND", "category", 0);
|
||||
m_current_view = COVERFLOW_CHANNEL;
|
||||
|
||||
LoadView();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_mainBtnNext) || m_btnMgr.selected(m_mainBtnPrev))
|
||||
@ -539,7 +532,6 @@ int CMenu::main(void)
|
||||
m_current_view = (show_homebrew && (parental_homebrew || !m_locked)) ? COVERFLOW_HOMEBREW : COVERFLOW_USB;
|
||||
else if (m_current_view == COVERFLOW_HOMEBREW)
|
||||
m_current_view = COVERFLOW_USB;
|
||||
m_category = m_cat.getInt(_domainFromView(), "category", 0);
|
||||
LoadView();
|
||||
}
|
||||
else if (m_btnMgr.selected(m_mainBtnInit))
|
||||
|
Loading…
Reference in New Issue
Block a user