mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Small fix to the populateList function of the GridGameListView
- Call the addPlaceholder function if grid is empty - Set the header text
This commit is contained in:
parent
560ca045cd
commit
96b1f4b514
|
@ -38,11 +38,19 @@ bool GridGameListView::input(InputConfig* config, Input input)
|
|||
void GridGameListView::populateList(const std::vector<FileData*>& files)
|
||||
{
|
||||
mGrid.clear();
|
||||
mHeaderText.setText(mRoot->getSystem()->getFullName());
|
||||
if (files.size() > 0)
|
||||
{
|
||||
for (auto it = files.cbegin(); it != files.cend(); it++)
|
||||
{
|
||||
mGrid.add((*it)->getName(), (*it)->getThumbnailPath(), *it);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
addPlaceholder();
|
||||
}
|
||||
}
|
||||
|
||||
void GridGameListView::addPlaceholder()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue