[Scummvm-git-logs] scummvm master -> 425ee5e8d71ed97530620d90acdde3360a01043b
sluicebox
noreply at scummvm.org
Thu May 23 01:46:28 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
425ee5e8d7 GUI: Fix saveload display of selected empty items
Commit: 425ee5e8d71ed97530620d90acdde3360a01043b
https://github.com/scummvm/scummvm/commit/425ee5e8d71ed97530620d90acdde3360a01043b
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-05-22T21:46:24-04:00
Commit Message:
GUI: Fix saveload display of selected empty items
Fixes minor bug introduced in 829c600a02ad6124006ae8cc784a873f52140637
In the saveload list dialog, selecting an empty slot before the last
save stopped coloring most of the row. Empty slots after the last save
continued to display correctly. Now both code blocks are consistent and
the selected row is always fully colored.
Changed paths:
gui/saveload-dialog.cpp
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 7e9fbd40d38..c764f29c70c 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -740,6 +740,7 @@ void SaveLoadChooserSimple::updateSaveList() {
int saveSlot = 0;
Common::U32StringArray saveNames;
ThemeEngine::FontColor color = ThemeEngine::kFontColorNormal;
+ Common::U32String emptyDesc;
for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) {
// Handle gaps in the list of save games
saveSlot = x->getSaveSlot();
@@ -747,7 +748,7 @@ void SaveLoadChooserSimple::updateSaveList() {
while (curSlot < saveSlot) {
SaveStateDescriptor dummySave(_metaEngine, curSlot, "");
_saveList.insert_at(curSlot, dummySave);
- saveNames.push_back(GUI::ListWidget::getThemeColor(color) + dummySave.getDescription());
+ saveNames.push_back(emptyDesc);
curSlot++;
}
@@ -785,8 +786,6 @@ void SaveLoadChooserSimple::updateSaveList() {
}
#endif
- Common::U32String emptyDesc;
- color = ThemeEngine::kFontColorNormal;
for (int i = curSlot; i <= maximumSaveSlots; i++) {
saveNames.push_back(emptyDesc);
SaveStateDescriptor dummySave(_metaEngine, i, "");
More information about the Scummvm-git-logs
mailing list