mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-19 02:38:32 +00:00
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.
This commit is contained in:
parent
3c23e9e2a6
commit
425ee5e8d7
@ -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, "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user