- Small Source Menu update. Restored hover button images.

This commit is contained in:
fledge68 2013-06-27 14:29:40 +00:00
parent 022ea31127
commit f17962e609

View File

@ -106,6 +106,7 @@ void CMenu::_updateSourceBtns(void)
m_btnMgr.hide(m_sourceBtnSource[i], true); m_btnMgr.hide(m_sourceBtnSource[i], true);
const char *ImgName = NULL; const char *ImgName = NULL;
const char *ImgSelName = NULL;
u8 j = (Source_curPage - 1) * 12; u8 j = (Source_curPage - 1) * 12;
for(u8 i = 0; i < 12; ++i) for(u8 i = 0; i < 12; ++i)
@ -168,6 +169,7 @@ void CMenu::_updateSourceBtns(void)
ImgName = m_source.getString(fmt("BUTTON_%i", i + j),"image", "").c_str(); ImgName = m_source.getString(fmt("BUTTON_%i", i + j),"image", "").c_str();
} }
ImgSelName = m_source.getString(fmt("BUTTON_%i", i + j),"image_s", "").c_str();
TexData texConsoleImg; TexData texConsoleImg;
TexData texConsoleImgs; TexData texConsoleImgs;
@ -176,9 +178,9 @@ void CMenu::_updateSourceBtns(void)
if(TexHandle.fromImageFile(texConsoleImg, fmt("%s/%s", m_sourceDir.c_str(), ImgName)) != TE_OK) if(TexHandle.fromImageFile(texConsoleImg, fmt("%s/%s", m_sourceDir.c_str(), ImgName)) != TE_OK)
TexHandle.fromPNG(texConsoleImg, favoriteson_png); TexHandle.fromPNG(texConsoleImg, favoriteson_png);
} }
if(TexHandle.fromImageFile(texConsoleImgs, fmt("%s/%s", m_themeDataDir.c_str(), ImgName)) != TE_OK) if(TexHandle.fromImageFile(texConsoleImgs, fmt("%s/%s", m_themeDataDir.c_str(), ImgSelName)) != TE_OK)
{ {
if(TexHandle.fromImageFile(texConsoleImgs, fmt("%s/%s", m_sourceDir.c_str(), ImgName)) != TE_OK) if(TexHandle.fromImageFile(texConsoleImgs, fmt("%s/%s", m_sourceDir.c_str(), ImgSelName)) != TE_OK)
TexHandle.fromPNG(texConsoleImgs, favoritesons_png); TexHandle.fromPNG(texConsoleImgs, favoritesons_png);
} }
m_btnMgr.setBtnTexture(m_sourceBtnSource[i], texConsoleImg, texConsoleImgs); m_btnMgr.setBtnTexture(m_sourceBtnSource[i], texConsoleImg, texConsoleImgs);