mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +01:00
-changed internal update changelog display, should be
scrollable now and fit the text completely
This commit is contained in:
parent
3b105916a6
commit
8ed9ea593d
@ -14,12 +14,21 @@ extern int mainIOS;
|
||||
int version_num = 0, num_versions = 0, i;
|
||||
int CMenu::_version[9] = {0, atoi(SVN_REV), atoi(SVN_REV), atoi(SVN_REV), atoi(SVN_REV), atoi(SVN_REV), atoi(SVN_REV), atoi(SVN_REV), atoi(SVN_REV)};
|
||||
|
||||
const int pixels_to_skip = 10;
|
||||
|
||||
void CMenu::_system()
|
||||
{
|
||||
int msg = 0, newVer = atoi(SVN_REV);
|
||||
lwp_t thread = LWP_THREAD_NULL;
|
||||
wstringEx prevMsg;
|
||||
|
||||
int amount_of_skips = 0;
|
||||
int update_x = 0, update_y = 0;
|
||||
u32 update_w = 0, update_h = 0;
|
||||
bool first = true;
|
||||
|
||||
m_btnMgr.reset(m_systemLblInfo, true);
|
||||
|
||||
SetupInput();
|
||||
m_btnMgr.setText(m_systemBtnBack, _t("dl1", L"Cancel"));
|
||||
m_thrdStop = false;
|
||||
@ -28,6 +37,19 @@ void CMenu::_system()
|
||||
while (true)
|
||||
{
|
||||
_mainLoopCommon(false, m_thrdWorking);
|
||||
|
||||
if (amount_of_skips == 0)
|
||||
{
|
||||
// Check dimensions in the loop, because the animation can have an effect
|
||||
m_btnMgr.getDimensions(m_systemLblInfo, update_x, update_y, update_w, update_h); // Get original dimensions
|
||||
}
|
||||
if(first)
|
||||
{
|
||||
m_btnMgr.moveBy(m_systemLblInfo, 0, -(pixels_to_skip * 10));
|
||||
amount_of_skips++;
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (m_showtimer == -1)
|
||||
{
|
||||
m_showtimer = 120;
|
||||
@ -62,13 +84,25 @@ void CMenu::_system()
|
||||
_showSystem();
|
||||
}
|
||||
}
|
||||
if ((BTN_HOME_PRESSED || BTN_B_PRESSED || m_exit) && !m_thrdWorking)
|
||||
if ((BTN_DOWN_PRESSED || BTN_DOWN_HELD) && !(m_thrdWorking && m_thrdStop))
|
||||
{
|
||||
if (update_h - (amount_of_skips * pixels_to_skip) > (m_vid.height2D() - (35 + update_y)))
|
||||
{
|
||||
m_btnMgr.moveBy(m_systemLblInfo, 0, -pixels_to_skip);
|
||||
amount_of_skips++;
|
||||
}
|
||||
}
|
||||
else if ((BTN_UP_PRESSED || BTN_UP_HELD) && !(m_thrdWorking && m_thrdStop))
|
||||
{
|
||||
if (amount_of_skips > 1)
|
||||
{
|
||||
m_btnMgr.moveBy(m_systemLblInfo, 0, pixels_to_skip);
|
||||
amount_of_skips--;
|
||||
}
|
||||
}
|
||||
else if ((BTN_HOME_PRESSED || BTN_B_PRESSED || m_exit) && !m_thrdWorking)
|
||||
break;
|
||||
else if (BTN_UP_PRESSED)
|
||||
m_btnMgr.up();
|
||||
else if (BTN_DOWN_PRESSED)
|
||||
m_btnMgr.down();
|
||||
if ((BTN_A_PRESSED) && !(m_thrdWorking && m_thrdStop))
|
||||
else if ((BTN_A_PRESSED) && !(m_thrdWorking && m_thrdStop))
|
||||
{
|
||||
if ((m_btnMgr.selected(m_systemBtnDownload)) && !m_thrdWorking)
|
||||
{
|
||||
@ -114,12 +148,12 @@ void CMenu::_system()
|
||||
newVer = CMenu::_version[i];
|
||||
m_app_update_size = m_version.getInt(sfmt("VERSION%i", i - 1u), "app_zip_size", 0);
|
||||
if (i > 1 && i != num_versions)
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"));
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"), false);
|
||||
else
|
||||
if (i == num_versions)
|
||||
m_btnMgr.setText(m_systemLblInfo, _t("sys7", L"Installed Version."));
|
||||
m_btnMgr.setText(m_systemLblInfo, _t("sys7", L"Installed Version."), false);
|
||||
else
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString("GENERAL", "changes"));
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString("GENERAL", "changes"), false);
|
||||
}
|
||||
}
|
||||
else if (m_btnMgr.selected(m_systemBtnVerSelectP))
|
||||
@ -134,12 +168,12 @@ void CMenu::_system()
|
||||
newVer = CMenu::_version[i];
|
||||
m_app_update_size = m_version.getInt(sfmt("VERSION%i", i - 1u), "app_zip_size", 0);
|
||||
if (i > 1 && i != num_versions)
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"));
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"), false);
|
||||
else
|
||||
if (i == num_versions)
|
||||
m_btnMgr.setText(m_systemLblInfo, _t("sys7", L"Installed Version."));
|
||||
m_btnMgr.setText(m_systemLblInfo, _t("sys7", L"Installed Version."), false);
|
||||
else
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString("GENERAL", "changes"));
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString("GENERAL", "changes"), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -205,7 +239,7 @@ void CMenu::_showSystem(void)
|
||||
m_btnMgr.show(m_systemLblVersionTxt);
|
||||
m_btnMgr.show(m_systemLblVersion);
|
||||
m_btnMgr.show(m_systemBtnBack);
|
||||
m_btnMgr.show(m_systemLblInfo);
|
||||
m_btnMgr.show(m_systemLblInfo,false,true);
|
||||
m_btnMgr.show(m_systemLblVerSelectVal);
|
||||
m_btnMgr.show(m_systemBtnVerSelectM);
|
||||
m_btnMgr.show(m_systemBtnVerSelectP);
|
||||
@ -228,7 +262,7 @@ void CMenu::_initSystemMenu(CMenu::SThemeData &theme)
|
||||
m_systemBtnDownload = _addButton(theme, "SYSTEM/DOWNLOAD_BTN", theme.btnFont, L"", 20, 410, 200, 56, theme.btnFontColor);
|
||||
m_systemBtnBack = _addButton(theme, "SYSTEM/BACK_BTN", theme.btnFont, L"", 420, 410, 200, 56, theme.btnFontColor);
|
||||
|
||||
m_systemLblInfo = _addLabel(theme, "SYSTEM/INFO", theme.lblFont, L"", 40, 210, 560, 180, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
|
||||
m_systemLblInfo = _addText(theme, "SYSTEM/INFO", theme.txtFont, L"", 20, 300, 600, 280, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
|
||||
m_systemLblVerSelectVal = _addLabel(theme, "SYSTEM/VER_SELECT_BTN", theme.btnFont, L"", 296, 150, 50, 56, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
||||
m_systemBtnVerSelectM = _addPicButton(theme, "SYSTEM/VER_SELECT_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 240, 150, 56, 56);
|
||||
m_systemBtnVerSelectP = _addPicButton(theme, "SYSTEM/VER_SELECT_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 346, 150, 56, 56);
|
||||
@ -239,7 +273,7 @@ void CMenu::_initSystemMenu(CMenu::SThemeData &theme)
|
||||
_setHideAnim(m_systemLblVersionTxt, "SYSTEM/VERSION_TXT", -100, 0, 0.f, 0.f);
|
||||
_setHideAnim(m_systemLblVersion, "SYSTEM/VERSION", 200, 0, 0.f, 0.f);
|
||||
|
||||
_setHideAnim(m_systemLblInfo, "SYSTEM/INFO", 0, -180, 1.f, -1.f);
|
||||
_setHideAnim(m_systemLblInfo, "SYSTEM/INFO", 0, 100, 0.f, 0.f);
|
||||
_setHideAnim(m_systemLblVerSelectVal, "SYSTEM/VER_SELECT_BTN", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_systemBtnVerSelectM, "SYSTEM/VER_SELECT_MINUS", 0, 0, 1.f, -1.f);
|
||||
_setHideAnim(m_systemBtnVerSelectP, "SYSTEM/VER_SELECT_PLUS", 0, 0, 1.f, -1.f);
|
||||
@ -264,11 +298,11 @@ void CMenu::_textSystem(void)
|
||||
{
|
||||
m_btnMgr.setText(m_systemLblVerSelectVal, wstringEx(sfmt("%i", CMenu::_version[i])));
|
||||
if (i > 1 && i != num_versions)
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"));
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString(sfmt("VERSION%i", i - 1u), "changes"), false);
|
||||
else
|
||||
if (i == num_versions)
|
||||
m_btnMgr.setText(m_systemLblInfo, _t("sys7", L"Installed Version."));
|
||||
m_btnMgr.setText(m_systemLblInfo, _t("sys7", L"Installed Version."), false);
|
||||
else
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString("GENERAL", "changes"));
|
||||
m_btnMgr.setText(m_systemLblInfo, m_version.getWString("GENERAL", "changes"), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user