Skip to content

Commit

Permalink
GUI: Show additional meta data in the thumbnail load chooser via tool…
Browse files Browse the repository at this point in the history
…tip.
  • Loading branch information
Johannes Schickel committed Jun 20, 2012
1 parent 80ae9d7 commit d7db655
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions gui/saveload-dialog.cpp
Expand Up @@ -556,6 +556,33 @@ void LoadChooserThumbnailed::updateSaves() {
curButton.setVisible(true);
curButton.button->setGfx(desc.getThumbnail());
curButton.description->setLabel(Common::String::format("%d. %s", saveSlot, desc.getDescription().c_str()));

Common::String tooltip(_("Name: "));
tooltip += desc.getDescription();

if (_saveDateSupport) {
const Common::String &saveDate = desc.getSaveDate();
if (!saveDate.empty()) {
tooltip += "\n";
tooltip += _("Date: ") + saveDate;
}

const Common::String &saveTime = desc.getSaveTime();
if (!saveTime.empty()) {
tooltip += "\n";
tooltip += _("Time: ") + saveTime;
}
}

if (_playTimeSupport) {
const Common::String &playTime = desc.getPlayTime();
if (!playTime.empty()) {
tooltip += "\n";
tooltip += _("Playtime: ") + playTime;
}
}

curButton.button->setTooltip(tooltip);
}

if (_curPage > 0)
Expand Down

0 comments on commit d7db655

Please sign in to comment.