mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 21:54:15 +01:00
630594d976
-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
158 lines
6.2 KiB
C++
158 lines
6.2 KiB
C++
|
|
#include "menu.hpp"
|
|
|
|
s16 m_coverbnrLblTitle;
|
|
s16 m_coverbnrBtnBack;
|
|
|
|
s16 m_coverbnrLblDlCover;
|
|
s16 m_coverbnrBtnDlCover;
|
|
|
|
s16 m_coverbnrLblDeleteCover;
|
|
s16 m_coverbnrBtnDeleteCover;
|
|
|
|
s16 m_coverbnrLblDlBanner;
|
|
s16 m_coverbnrBtnDlBanner;
|
|
|
|
s16 m_coverbnrLblDeleteBanner;
|
|
s16 m_coverbnrBtnDeleteBanner;
|
|
|
|
s16 m_coverbnrLblUser[4];
|
|
TexData m_coverbnrBg;
|
|
|
|
void CMenu::_hideCoverBanner(bool instant)
|
|
{
|
|
m_btnMgr.hide(m_coverbnrLblTitle, instant);
|
|
m_btnMgr.hide(m_coverbnrBtnBack, instant);
|
|
m_btnMgr.hide(m_coverbnrLblDlCover, instant);
|
|
m_btnMgr.hide(m_coverbnrLblDeleteCover, instant);
|
|
m_btnMgr.hide(m_coverbnrLblDlBanner, instant);
|
|
m_btnMgr.hide(m_coverbnrLblDeleteBanner, instant);
|
|
|
|
m_btnMgr.hide(m_coverbnrBtnDlCover, instant);
|
|
m_btnMgr.hide(m_coverbnrBtnDeleteCover, instant);
|
|
m_btnMgr.hide(m_coverbnrBtnDlBanner, instant);
|
|
m_btnMgr.hide(m_coverbnrBtnDeleteBanner, instant);
|
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_coverbnrLblUser); ++i)
|
|
if(m_coverbnrLblUser[i] != -1)
|
|
m_btnMgr.hide(m_coverbnrLblUser[i], instant);
|
|
}
|
|
|
|
void CMenu::_showCoverBanner(void)
|
|
{
|
|
_setBg(m_coverbnrBg, m_coverbnrBg);
|
|
m_btnMgr.show(m_coverbnrLblTitle);
|
|
m_btnMgr.show(m_coverbnrBtnBack);
|
|
|
|
m_btnMgr.show(m_coverbnrLblDlCover);
|
|
m_btnMgr.show(m_coverbnrLblDeleteCover);
|
|
m_btnMgr.show(m_coverbnrLblDlBanner);
|
|
m_btnMgr.show(m_coverbnrLblDeleteBanner);
|
|
|
|
m_btnMgr.show(m_coverbnrBtnDlCover);
|
|
m_btnMgr.show(m_coverbnrBtnDeleteCover);
|
|
m_btnMgr.show(m_coverbnrBtnDlBanner);
|
|
m_btnMgr.show(m_coverbnrBtnDeleteBanner);
|
|
|
|
for(u8 i = 0; i < ARRAY_SIZE(m_coverbnrLblUser); ++i)
|
|
if(m_coverbnrLblUser[i] != -1)
|
|
m_btnMgr.show(m_coverbnrLblUser[i]);
|
|
}
|
|
|
|
void CMenu::_CoverBanner(void)
|
|
{
|
|
const char *id = CoverFlow.getId();
|
|
SetupInput();
|
|
_showCoverBanner();
|
|
while(!m_exit)
|
|
{
|
|
_mainLoopCommon();
|
|
if (BTN_HOME_PRESSED || BTN_B_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_coverbnrBtnBack)))
|
|
break;
|
|
else if (BTN_UP_PRESSED)
|
|
m_btnMgr.up();
|
|
else if (BTN_DOWN_PRESSED)
|
|
m_btnMgr.down();
|
|
else if(BTN_A_PRESSED)
|
|
{
|
|
if(m_btnMgr.selected(m_coverbnrBtnDlCover))
|
|
{
|
|
_hideCoverBanner();
|
|
_download(id);
|
|
_showCoverBanner();
|
|
}
|
|
else if(m_btnMgr.selected(m_coverbnrBtnDeleteCover))
|
|
{
|
|
_hideCoverBanner();
|
|
RemoveCover(id);
|
|
_showCoverBanner();
|
|
}
|
|
else if(m_btnMgr.selected(m_coverbnrBtnDlBanner))
|
|
{
|
|
_hideCoverBanner();
|
|
fsop_deleteFile(fmt("%s/%s.bnr", m_bnrCacheDir.c_str(), id));
|
|
fsop_deleteFile(fmt("%s/%s.bnr", m_customBnrDir.c_str(), id));
|
|
fsop_deleteFile(fmt("%s/%.3s.bnr", m_bnrCacheDir.c_str(), id));
|
|
fsop_deleteFile(fmt("%s/%.3s.bnr", m_customBnrDir.c_str(), id));
|
|
_downloadBnr(id);
|
|
_showCoverBanner();
|
|
}
|
|
else if(m_btnMgr.selected(m_coverbnrBtnDeleteBanner))
|
|
{
|
|
_hideCoverBanner();
|
|
fsop_deleteFile(fmt("%s/%s.bnr", m_bnrCacheDir.c_str(), id));
|
|
fsop_deleteFile(fmt("%s/%s.bnr", m_customBnrDir.c_str(), id));
|
|
fsop_deleteFile(fmt("%s/%.3s.bnr", m_bnrCacheDir.c_str(), id));
|
|
fsop_deleteFile(fmt("%s/%.3s.bnr", m_customBnrDir.c_str(), id));
|
|
_showCoverBanner();
|
|
}
|
|
}
|
|
}
|
|
_hideCoverBanner();
|
|
}
|
|
|
|
void CMenu::_initCoverBanner()
|
|
{
|
|
m_coverbnrBg = _texture("COVERBNR/BG", "texture", theme.bg, false);
|
|
_addUserLabels(m_coverbnrLblUser, ARRAY_SIZE(m_coverbnrLblUser), "COVERBNR");
|
|
m_coverbnrLblTitle = _addTitle("COVERBNR/TITLE", theme.titleFont, L"", 0, 10, 640, 60, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
|
|
m_coverbnrBtnBack = _addButton("COVERBNR/BACK_BTN", theme.btnFont, L"", 420, 400, 200, 48, theme.btnFontColor);
|
|
|
|
m_coverbnrLblDlCover = _addLabel("COVERBNR/DLCOVER", theme.lblFont, L"", 20, 125, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
|
m_coverbnrBtnDlCover = _addButton("COVERBNR/DLCOVER_BTN", theme.btnFont, L"", 420, 130, 200, 48, theme.btnFontColor);
|
|
m_coverbnrLblDeleteCover = _addLabel("COVERBNR/DELCOVER", theme.lblFont, L"", 20, 185, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
|
m_coverbnrBtnDeleteCover = _addButton("COVERBNR/DELCOVER_BTN", theme.btnFont, L"", 420, 190, 200, 48, theme.btnFontColor);
|
|
m_coverbnrLblDlBanner = _addLabel("COVERBNR/DLBNR", theme.lblFont, L"", 20, 245, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
|
m_coverbnrBtnDlBanner = _addButton("COVERBNR/DLBNR_BTN", theme.btnFont, L"", 420, 250, 200, 48, theme.btnFontColor);
|
|
m_coverbnrLblDeleteBanner = _addLabel("COVERBNR/DELBNR", theme.lblFont, L"", 20, 305, 385, 56, theme.lblFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE);
|
|
m_coverbnrBtnDeleteBanner = _addButton("COVERBNR/DELBNR_BTN", theme.btnFont, L"", 420, 310, 200, 48, theme.btnFontColor);
|
|
|
|
_setHideAnim(m_coverbnrLblTitle, "COVERBNR/TITLE", 0, 0, -2.f, 0.f);
|
|
_setHideAnim(m_coverbnrBtnBack, "COVERBNR/BACK_BTN", 0, 0, 1.f, -1.f);
|
|
_setHideAnim(m_coverbnrLblDlCover, "COVERBNR/DLCOVER", 50, 0, -2.f, 0.f);
|
|
_setHideAnim(m_coverbnrBtnDlCover, "COVERBNR/DLCOVER_BTN", -50, 0, 1.f, 0.f);
|
|
_setHideAnim(m_coverbnrLblDeleteCover, "COVERBNR/DELCOVER", 50, 0, -2.f, 0.f);
|
|
_setHideAnim(m_coverbnrBtnDeleteCover, "COVERBNR/DELCOVER_BTN", -50, 0, 1.f, 0.f);
|
|
_setHideAnim(m_coverbnrLblDlBanner, "COVERBNR/DLBNR", 50, 0, -2.f, 0.f);
|
|
_setHideAnim(m_coverbnrBtnDlBanner, "COVERBNR/DLBNR_BTN", -50, 0, 1.f, 0.f);
|
|
_setHideAnim(m_coverbnrLblDeleteBanner, "COVERBNR/DELBNR", 50, 0, -2.f, 0.f);
|
|
_setHideAnim(m_coverbnrBtnDeleteBanner, "COVERBNR/DELBNR_BTN", -50, 0, 1.f, 0.f);
|
|
_hideCoverBanner(true);
|
|
_textCoverBanner();
|
|
}
|
|
|
|
void CMenu::_textCoverBanner(void)
|
|
{
|
|
m_btnMgr.setText(m_coverbnrLblTitle, _t("cfgg40", L"Manage Cover and Banner"));
|
|
m_btnMgr.setText(m_coverbnrLblDlCover, _t("cfgbnr1", L"Download Cover"));
|
|
m_btnMgr.setText(m_coverbnrLblDeleteCover, _t("cfgbnr2", L"Delete Cover"));
|
|
m_btnMgr.setText(m_coverbnrLblDlBanner, _t("cfgbnr3", L"Download Custom Banner"));
|
|
m_btnMgr.setText(m_coverbnrLblDeleteBanner, _t("cfgbnr4", L"Delete Banner"));
|
|
|
|
m_btnMgr.setText(m_coverbnrBtnDlCover, _t("cfgbnr5", L"Download"));
|
|
m_btnMgr.setText(m_coverbnrBtnDeleteCover, _t("cfgbnr6", L"Delete"));
|
|
m_btnMgr.setText(m_coverbnrBtnDlBanner, _t("cfgbnr5", L"Download"));
|
|
m_btnMgr.setText(m_coverbnrBtnDeleteBanner, _t("cfgbnr6", L"Delete"));
|
|
m_btnMgr.setText(m_coverbnrBtnBack, _t("cfg10", L"Back"));
|
|
}
|