Merge pull request #400 from Koerty/grid-fix-populateList

[GRID FIX] Update the populateList function of the GridGameListView
This commit is contained in:
Jools Wills 2018-04-05 14:42:19 +01:00 committed by GitHub
commit 2ff3252b21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,11 +51,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()
{