GUI: Group entries by "gameid".
This commit is contained in:
parent
2f2c1dae94
commit
34cb198dee
1 changed files with 7 additions and 7 deletions
|
@ -1153,7 +1153,7 @@ void GridWidget::gridFromGameList(Common::Array<LauncherEntry> *list) {
|
||||||
int k = 0;
|
int k = 0;
|
||||||
for (Common::Array<LauncherEntry>::iterator i = list->begin(); i != list->end(); ++i) {
|
for (Common::Array<LauncherEntry>::iterator i = list->begin(); i != list->end(); ++i) {
|
||||||
k = row * entriesPerRow + col;
|
k = row * entriesPerRow + col;
|
||||||
EntryContainerWidget *newEntry = entryById[i->key];
|
EntryContainerWidget *newEntry = entryById[i->domain->getVal("gameid")];
|
||||||
if (!newEntry) {
|
if (!newEntry) {
|
||||||
GraphicsWidget *th = new GraphicsWidget(this, 0, 0 , kThumbnailWidth, kThumbnailHeight);
|
GraphicsWidget *th = new GraphicsWidget(this, 0, 0 , kThumbnailWidth, kThumbnailHeight);
|
||||||
GraphicsWidget *p = new GraphicsWidget(this, kThumbnailWidth - 32, kThumbnailHeight - 32, 32, 32);
|
GraphicsWidget *p = new GraphicsWidget(this, kThumbnailWidth - 32, kThumbnailHeight - 32, 32, 32);
|
||||||
|
@ -1171,16 +1171,16 @@ void GridWidget::gridFromGameList(Common::Array<LauncherEntry> *list) {
|
||||||
// newEntry = new EntryContainerWidget(this, 50 + col * (kThumbnailWidth + 50), 50 + row * (kThumbnailHeight + 80), kThumbnailWidth, kThumbnailHeight+kLineHeight*2);
|
// newEntry = new EntryContainerWidget(this, 50 + col * (kThumbnailWidth + 50), 50 + row * (kThumbnailHeight + 80), kThumbnailWidth, kThumbnailHeight+kLineHeight*2);
|
||||||
|
|
||||||
_entries.push_back(newEntry);
|
_entries.push_back(newEntry);
|
||||||
}
|
|
||||||
newEntry->addInstallation(*i);
|
|
||||||
newEntry->updateEntry();
|
|
||||||
entryById[i->key] = newEntry;
|
|
||||||
if (++col >= entriesPerRow) {
|
if (++col >= entriesPerRow) {
|
||||||
++row;
|
++row;
|
||||||
col = 0;
|
col = 0;
|
||||||
}
|
}
|
||||||
++k;
|
++k;
|
||||||
}
|
}
|
||||||
|
newEntry->addInstallation(*i);
|
||||||
|
newEntry->updateEntry();
|
||||||
|
entryById[i->domain->getVal("gameid")] = newEntry;
|
||||||
|
}
|
||||||
_innerHeight = 100 + (row * (kThumbnailHeight + 80));
|
_innerHeight = 100 + (row * (kThumbnailHeight + 80));
|
||||||
_innerWidth = 100 + (col * (kThumbnailWidth + 50));
|
_innerWidth = 100 + (col * (kThumbnailWidth + 50));
|
||||||
// warning("%d %d", _innerWidth, _innerHeight);
|
// warning("%d %d", _innerWidth, _innerHeight);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue