Skip to content

Commit

Permalink
GUI: Improve DLC download request indication
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushdutt committed Aug 3, 2023
1 parent c71f73f commit 892a6d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions backends/dlc/scummvmcloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
9 changes: 6 additions & 3 deletions gui/dlcsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit 892a6d3

Please sign in to comment.