mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +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,9 +38,17 @@ bool GridGameListView::input(InputConfig* config, Input input)
|
||||||
void GridGameListView::populateList(const std::vector<FileData*>& files)
|
void GridGameListView::populateList(const std::vector<FileData*>& files)
|
||||||
{
|
{
|
||||||
mGrid.clear();
|
mGrid.clear();
|
||||||
for(auto it = files.cbegin(); it != files.cend(); it++)
|
mHeaderText.setText(mRoot->getSystem()->getFullName());
|
||||||
|
if (files.size() > 0)
|
||||||
{
|
{
|
||||||
mGrid.add((*it)->getName(), (*it)->getThumbnailPath(), *it);
|
for (auto it = files.cbegin(); it != files.cend(); it++)
|
||||||
|
{
|
||||||
|
mGrid.add((*it)->getName(), (*it)->getThumbnailPath(), *it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
addPlaceholder();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue