Merge pull request #312 from eku/feature/update_total_games_count

Show total number of games on filter change
This commit is contained in:
Fledge68 2022-09-07 09:34:07 -05:00 committed by GitHub
commit 62813afad3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -1061,6 +1061,7 @@ private:
//
void _showError(void);
void _showMain(void);
void _showTotalGames(const int numberOfGames);
void _showConfigCommon(const TexData & bg, int page);
void _showConfig(void);
void _showConfig3(void);

View File

@ -121,6 +121,13 @@ void CMenu::_showMain()
_showCF(m_refreshGameList);
}
void CMenu::_showTotalGames(const int numberOfGames)
{
m_showtimer = 240;
m_btnMgr.setText(m_mainLblNotice, wfmt(_fmt("main7", L"Total Games: %i"), numberOfGames));
m_btnMgr.show(m_mainLblNotice);
}
void CMenu::_showCF(bool refreshList)
{
m_refreshGameList = false;
@ -345,9 +352,7 @@ void CMenu::_showCF(bool refreshList)
if(m_sourceflow || m_current_view == COVERFLOW_HOMEBREW)
return;
m_showtimer = 240;
m_btnMgr.setText(m_mainLblNotice, wfmt(_fmt("main7", L"Total Games: %i"), CoverFlow.size()));
m_btnMgr.show(m_mainLblNotice);
_showTotalGames(CoverFlow.size());
}
int CMenu::main(void)
@ -577,6 +582,7 @@ int CMenu::main(void)
{
m_refreshGameList = false;
_initCF();
_showTotalGames(CoverFlow.size());
}
}
else if(m_btnMgr.selected(m_mainBtnDVD))
@ -615,6 +621,7 @@ int CMenu::main(void)
m_favorites = !m_favorites;
m_cfg.setBool(_domainFromView(), "favorites", m_favorites);
_initCF();
_showTotalGames(CoverFlow.size());
}
else if(!CoverFlow.empty() && CoverFlow.select())
{
@ -643,6 +650,7 @@ int CMenu::main(void)
{
m_refreshGameList = false;
_initCF();
_showTotalGames(CoverFlow.size());
}
else
CoverFlow.cancel();