GUI: Improve DLC download request indication

This commit is contained in:
Ankush Dutt 2023-08-03 15:29:55 +05:30 committed by Eugene Sandulenko
parent a4329e21b9
commit 2f6b87f0d4
2 changed files with 7 additions and 3 deletions

View File

@ -117,6 +117,7 @@ void ScummVMCloud::downloadFileCallback(Networking::DataResponse r) {
addEntryToConfig(destPath);
// handle next download
DLCMan._queuedDownloadTasks.front()->state = DLCDesc::kDownloaded;
DLCMan.refreshDLCList();
DLCMan._queuedDownloadTasks.pop();
DLCMan._dlcsInProgress.remove_at(0);
DLCMan.processDownloadQueue();

View File

@ -65,7 +65,11 @@ void DLCsDialog::refreshDLCList() {
// Populate the ListWidget
Common::U32StringArray games;
for (int i = 0; i < DLCMan._dlcs.size(); ++i) {
games.push_back(DLCMan._dlcs[i]->name);
if (DLCMan._dlcs[i]->state == DLC::DLCDesc::kInProgress) {
games.push_back("[Downloading] " + DLCMan._dlcs[i]->name);
} else {
games.push_back(DLCMan._dlcs[i]->name);
}
}
// Gray out already downloaded packages
@ -108,9 +112,8 @@ void DLCsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
}
break;
case kDownloadSelectedCmd: {
MessageDialog dialog("Downloading: " + _gamesList->getSelectedString());
dialog.runModal();
DLCMan.addDownload(_gamesList->getSelected());
refreshDLCList();
}
break;
case kRefreshDLCList: {