mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 04:09:15 +01:00
- added optional custom coverflow background via source menu button. add 'background=img_name.png or .jpg to any source menu button. put the background images in wiiflow/backgrounds.
This commit is contained in:
parent
21b6bec670
commit
dc679ccced
@ -163,13 +163,14 @@ private:
|
|||||||
const char *m_txt_path;
|
const char *m_txt_path;
|
||||||
|
|
||||||
// Background image stuff
|
// Background image stuff
|
||||||
TexData sfbgimg;
|
|
||||||
TexData m_curBg;
|
TexData m_curBg;
|
||||||
const TexData *m_prevBg;
|
const TexData *m_prevBg;
|
||||||
const TexData *m_nextBg;
|
const TexData *m_nextBg;
|
||||||
const TexData *m_lqBg;
|
const TexData *m_lqBg;
|
||||||
u8 m_bgCrossFade;
|
u8 m_bgCrossFade;
|
||||||
//
|
//
|
||||||
|
TexData sfbgimg;
|
||||||
|
TexData m_mainAltBg;
|
||||||
TexData m_errorBg;
|
TexData m_errorBg;
|
||||||
TexData m_mainBg;
|
TexData m_mainBg;
|
||||||
TexData m_configBg;
|
TexData m_configBg;
|
||||||
@ -1028,6 +1029,7 @@ private:
|
|||||||
void _updateCheckboxes(void);
|
void _updateCheckboxes(void);
|
||||||
void _getGameCategories(void);
|
void _getGameCategories(void);
|
||||||
void _setGameCategories(void);
|
void _setGameCategories(void);
|
||||||
|
void _setMainBg(void);
|
||||||
void _setBg(const TexData &bgTex, const TexData &bglqTex, bool force_change = false);
|
void _setBg(const TexData &bgTex, const TexData &bglqTex, bool force_change = false);
|
||||||
void _updateBg(void);
|
void _updateBg(void);
|
||||||
void _drawBg(void);
|
void _drawBg(void);
|
||||||
|
@ -335,7 +335,7 @@ void CMenu::_showGame(void)
|
|||||||
CoverFlow.hideCover();
|
CoverFlow.hideCover();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_setBg(m_gameBg, m_gameBgLQ);
|
_setMainBg();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!m_zoom_banner)
|
if(!m_zoom_banner)
|
||||||
|
@ -41,9 +41,24 @@ void CMenu::_hideMain(bool instant)
|
|||||||
m_btnMgr.hide(m_mainLblUser[i], instant);
|
m_btnMgr.hide(m_mainLblUser[i], instant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMenu::_setMainBg()
|
||||||
|
{
|
||||||
|
string fn = m_cfg.getString("general", "main_background", "");
|
||||||
|
if(fn.length() > 0)
|
||||||
|
{
|
||||||
|
TexHandle.Cleanup(m_mainAltBg);
|
||||||
|
if(TexHandle.fromImageFile(m_mainAltBg, fmt("%s/backgrounds/%s", m_dataDir.c_str(), fn.c_str())) == TE_OK)
|
||||||
|
_setBg(m_mainAltBg, m_mainAltBg, true);
|
||||||
|
else
|
||||||
|
_setBg(m_mainBg, m_mainBgLQ);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_setBg(m_mainBg, m_mainBgLQ);
|
||||||
|
}
|
||||||
|
|
||||||
void CMenu::_showMain()
|
void CMenu::_showMain()
|
||||||
{
|
{
|
||||||
_setBg(m_mainBg, m_mainBgLQ);
|
_setMainBg();
|
||||||
if(m_refreshGameList)
|
if(m_refreshGameList)
|
||||||
_showCF(m_refreshGameList);
|
_showCF(m_refreshGameList);
|
||||||
}
|
}
|
||||||
@ -318,7 +333,7 @@ int CMenu::main(void)
|
|||||||
if(m_sourceflow)//if exiting sourceflow via b button
|
if(m_sourceflow)//if exiting sourceflow via b button
|
||||||
{
|
{
|
||||||
m_sourceflow = false;
|
m_sourceflow = false;
|
||||||
_setBg(m_mainBg, m_mainBgLQ);
|
_setMainBg();
|
||||||
_showCF(true);
|
_showCF(true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -426,6 +441,8 @@ int CMenu::main(void)
|
|||||||
m_source_cnt = 1;
|
m_source_cnt = 1;
|
||||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||||
m_catStartPage = 1;
|
m_catStartPage = 1;
|
||||||
|
m_cfg.remove("GENERAL", "main_background");
|
||||||
|
_setMainBg();
|
||||||
_showCF(true);
|
_showCF(true);
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnConfig))
|
else if(m_btnMgr.selected(m_mainBtnConfig))
|
||||||
@ -501,6 +518,7 @@ int CMenu::main(void)
|
|||||||
if(m_sourceflow)
|
if(m_sourceflow)
|
||||||
{
|
{
|
||||||
_sourceFlow();// set the source selected
|
_sourceFlow();// set the source selected
|
||||||
|
_setMainBg();
|
||||||
_showCF(true);
|
_showCF(true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -514,7 +532,7 @@ int CMenu::main(void)
|
|||||||
bheld = true;
|
bheld = true;
|
||||||
bUsed = true;
|
bUsed = true;
|
||||||
}
|
}
|
||||||
_setBg(m_mainBg, m_mainBgLQ);
|
_setMainBg();
|
||||||
if(m_refreshGameList)
|
if(m_refreshGameList)
|
||||||
{
|
{
|
||||||
/* if changes were made to favorites, parental lock, or categories */
|
/* if changes were made to favorites, parental lock, or categories */
|
||||||
@ -541,7 +559,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
bheld = false;
|
bheld = false;
|
||||||
_setBg(m_mainBg, m_mainBgLQ);
|
_setMainBg();
|
||||||
if(m_refreshGameList)
|
if(m_refreshGameList)
|
||||||
{
|
{
|
||||||
m_refreshGameList = false;
|
m_refreshGameList = false;
|
||||||
|
@ -174,6 +174,7 @@ void CMenu::_PluginSettings()
|
|||||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||||
m_source_cnt = 1;
|
m_source_cnt = 1;
|
||||||
m_catStartPage = 1;
|
m_catStartPage = 1;
|
||||||
|
m_cfg.remove("GENERAL", "main_background");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_current_view = m_cfg.getUInt("GENERAL", "sources");
|
m_current_view = m_cfg.getUInt("GENERAL", "sources");
|
||||||
|
@ -135,7 +135,6 @@ void CMenu::_sourceFlow()
|
|||||||
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
m_cfg.setUInt("GENERAL", "sources", m_current_view);
|
||||||
m_source_cnt = 1;
|
m_source_cnt = 1;
|
||||||
_setSrcOptions();
|
_setSrcOptions();
|
||||||
_setBg(m_mainBg, m_mainBgLQ);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMenu::_getSrcFlow(void)
|
int CMenu::_getSrcFlow(void)
|
||||||
@ -201,6 +200,8 @@ void CMenu::_setSrcFlowBg(void)
|
|||||||
TexHandle.Cleanup(sfbgimg);
|
TexHandle.Cleanup(sfbgimg);
|
||||||
if(TexHandle.fromImageFile(sfbgimg, fmt("%s/backgrounds/%s", m_sourceDir.c_str(), fn.c_str())) == TE_OK)
|
if(TexHandle.fromImageFile(sfbgimg, fmt("%s/backgrounds/%s", m_sourceDir.c_str(), fn.c_str())) == TE_OK)
|
||||||
_setBg(sfbgimg, sfbgimg, true);
|
_setBg(sfbgimg, sfbgimg, true);
|
||||||
|
else
|
||||||
|
_setBg(m_mainBg, m_mainBgLQ);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_setBg(m_mainBg, m_mainBgLQ);
|
_setBg(m_mainBg, m_mainBgLQ);
|
||||||
@ -771,6 +772,7 @@ bool CMenu::_shortCover(const char *magic)
|
|||||||
|
|
||||||
void CMenu::_setSrcOptions(void)
|
void CMenu::_setSrcOptions(void)
|
||||||
{
|
{
|
||||||
|
m_cfg.setString("GENERAL", "main_background", m_source.getString(btn_selected, "background", ""));
|
||||||
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
|
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
|
||||||
u8 category = m_source.getInt(btn_selected, "category", 0);
|
u8 category = m_source.getInt(btn_selected, "category", 0);
|
||||||
if(category > 0)
|
if(category > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user