mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-30 01:55:39 +00:00
Merge pull request #400 from Koerty/grid-fix-populateList
[GRID FIX] Update the populateList function of the GridGameListView
This commit is contained in:
commit
2ff3252b21
|
@ -51,10 +51,18 @@ 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)
|
||||||
|
{
|
||||||
|
for (auto it = files.cbegin(); it != files.cend(); it++)
|
||||||
{
|
{
|
||||||
mGrid.add((*it)->getName(), (*it)->getThumbnailPath(), *it);
|
mGrid.add((*it)->getName(), (*it)->getThumbnailPath(), *it);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
addPlaceholder();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridGameListView::addPlaceholder()
|
void GridGameListView::addPlaceholder()
|
||||||
|
|
Loading…
Reference in a new issue