diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index 7551aca..9d6a557 100644
a
|
b
|
void ListWidget::setSelected(int item) {
|
141 | 141 | } |
142 | 142 | } |
143 | 143 | |
144 | | void ListWidget::setList(const StringList &list) { |
| 144 | void ListWidget::setList(const StringList &list, const ColorFlagList *colorFlags) { |
145 | 145 | if (_editMode && _caretVisible) |
146 | 146 | drawCaret(true); |
147 | 147 | |
… |
… |
void ListWidget::setList(const StringList &list) {
|
150 | 150 | _list = list; |
151 | 151 | _filter.clear(); |
152 | 152 | _listIndex.clear(); |
| 153 | _colorFlags.clear(); |
| 154 | |
| 155 | if (colorFlags) { |
| 156 | _colorFlags = *colorFlags; |
| 157 | assert(_colorFlags.size() == _dataList.size()); |
| 158 | } |
153 | 159 | |
154 | 160 | int size = list.size(); |
155 | 161 | if (_currentPos >= size) |
… |
… |
void ListWidget::setList(const StringList &list) {
|
162 | 168 | scrollBarRecalc(); |
163 | 169 | } |
164 | 170 | |
165 | | void ListWidget::append(const String &s) { |
| 171 | void ListWidget::append(const String &s, bool altColor) { |
| 172 | if (_dataList.size() == _colorFlags.size()) |
| 173 | _colorFlags.push_back(altColor); |
| 174 | |
166 | 175 | _dataList.push_back(s); |
167 | 176 | _list.push_back(s); |
168 | 177 | |
… |
… |
void ListWidget::drawWidget() {
|
431 | 440 | |
432 | 441 | int width; |
433 | 442 | |
| 443 | bool altColor = false; |
| 444 | |
| 445 | if (!_colorFlags.empty()) { |
| 446 | if (_filter.empty() || _selectedItem == -1) |
| 447 | altColor = _colorFlags[pos]; |
| 448 | else |
| 449 | altColor = _colorFlags[_listIndex[pos]]; |
| 450 | } |
| 451 | |
434 | 452 | if (_selectedItem == pos && _editMode) { |
435 | 453 | buffer = _editString; |
436 | 454 | adjustOffset(); |
437 | 455 | width = _w - r.left - _hlRightPadding - _leftPadding - scrollbarW; |
438 | 456 | g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 2), |
439 | | buffer, _state, Graphics::kTextAlignLeft, inverted, pad, true); |
| 457 | buffer, _state, Graphics::kTextAlignLeft, inverted, pad, true, ThemeEngine::kFontStyleBold, |
| 458 | altColor ? ThemeEngine::kFontColorAlternate : ThemeEngine::kFontColorNormal); |
440 | 459 | } else { |
441 | 460 | buffer = _list[pos]; |
442 | 461 | width = _w - r.left - scrollbarW; |
443 | 462 | g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 2), |
444 | | buffer, _state, Graphics::kTextAlignLeft, inverted, pad, true); |
| 463 | buffer, _state, Graphics::kTextAlignLeft, inverted, pad, true, ThemeEngine::kFontStyleBold, |
| 464 | altColor ? ThemeEngine::kFontColorAlternate : ThemeEngine::kFontColorNormal); |
445 | 465 | } |
446 | 466 | |
447 | 467 | _textWidth[i] = width; |
diff --git a/gui/ListWidget.h b/gui/ListWidget.h
index 203cd88..007525a 100644
a
|
b
|
class ListWidget : public EditableWidget {
|
51 | 51 | public: |
52 | 52 | typedef Common::String String; |
53 | 53 | typedef Common::StringList StringList; |
| 54 | typedef Common::Array<bool> ColorFlagList; |
54 | 55 | protected: |
55 | 56 | StringList _list; |
56 | 57 | StringList _dataList; |
| 58 | ColorFlagList _colorFlags; |
57 | 59 | Common::Array<int> _listIndex; |
58 | 60 | bool _editable; |
59 | 61 | bool _editMode; |
… |
… |
public:
|
87 | 89 | |
88 | 90 | virtual Widget *findWidget(int x, int y); |
89 | 91 | |
90 | | void setList(const StringList &list); |
91 | | void append(const String &s); |
| 92 | void setList(const StringList &list, const ColorFlagList *colorFlags = 0); |
| 93 | void append(const String &s, bool altColor = false); |
92 | 94 | const StringList &getList() const { return _dataList; } |
93 | 95 | int getSelected() const { return (_filter.empty() || _selectedItem == -1) ? _selectedItem : _listIndex[_selectedItem]; } |
94 | 96 | void setSelected(int item); |
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index f859c70..6f00a84 100644
a
|
b
|
void SaveLoadChooser::updateSaveList() {
|
327 | 327 | int curSlot = 0; |
328 | 328 | int saveSlot = 0; |
329 | 329 | StringList saveNames; |
| 330 | ListWidget::ColorFlagList colorFlags; |
330 | 331 | for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) { |
331 | 332 | // Handle gaps in the list of save games |
332 | 333 | saveSlot = atoi(x->save_slot().c_str()); |
… |
… |
void SaveLoadChooser::updateSaveList() {
|
335 | 336 | SaveStateDescriptor dummySave(curSlot, ""); |
336 | 337 | _saveList.insert_at(curSlot, dummySave); |
337 | 338 | saveNames.push_back(dummySave.description()); |
| 339 | colorFlags.push_back(false); |
338 | 340 | curSlot++; |
339 | 341 | } |
340 | 342 | |
… |
… |
void SaveLoadChooser::updateSaveList() {
|
349 | 351 | Common::String description = x->description(); |
350 | 352 | Common::String trimmedDescription = description; |
351 | 353 | trimmedDescription.trim(); |
352 | | if (trimmedDescription.empty()) |
| 354 | if (trimmedDescription.empty()) { |
353 | 355 | description = "Untitled savestate"; |
| 356 | colorFlags.push_back(true); |
| 357 | } else { |
| 358 | colorFlags.push_back(false); |
| 359 | } |
354 | 360 | |
355 | 361 | saveNames.push_back(description); |
356 | 362 | curSlot++; |
… |
… |
void SaveLoadChooser::updateSaveList() {
|
362 | 368 | saveNames.push_back(emptyDesc); |
363 | 369 | SaveStateDescriptor dummySave(i, ""); |
364 | 370 | _saveList.push_back(dummySave); |
| 371 | colorFlags.push_back(false); |
365 | 372 | } |
366 | 373 | |
367 | | _list->setList(saveNames); |
| 374 | _list->setList(saveNames, &colorFlags); |
368 | 375 | } |
369 | 376 | |
370 | 377 | } // End of namespace GUI |
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 88ef801..d9298ff 100644
a
|
b
|
|
1550 | 1550 | "color='lightgrey' " |
1551 | 1551 | "/> " |
1552 | 1552 | "<text_color id='color_alternative' " |
1553 | | "color='green' " |
| 1553 | "color='lightgrey' " |
1554 | 1554 | "/> " |
1555 | 1555 | "<text_color id='color_alternative_inverted' " |
1556 | | "color='black' " |
| 1556 | "color='255,255,255' " |
1557 | 1557 | "/> " |
1558 | 1558 | "<text_color id='color_alternative_hover' " |
1559 | | "color='green2' " |
| 1559 | "color='lightgrey' " |
1560 | 1560 | "/> " |
1561 | 1561 | "<text_color id='color_alternative_disabled' " |
1562 | 1562 | "color='lightgrey' " |
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index c295002..a7188cb 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummclassic/classic_gfx.stx b/gui/themes/scummclassic/classic_gfx.stx
index ff2fadc..3c552ac 100644
a
|
b
|
|
70 | 70 | /> |
71 | 71 | |
72 | 72 | <text_color id = 'color_alternative' |
73 | | color = 'green' |
| 73 | color = 'lightgrey' |
74 | 74 | /> |
75 | 75 | |
76 | 76 | <text_color id = 'color_alternative_inverted' |
77 | | color = 'black' |
| 77 | color = '255, 255, 255' |
78 | 78 | /> |
79 | 79 | |
80 | 80 | <text_color id = 'color_alternative_hover' |
81 | | color = 'green2' |
| 81 | color = 'lightgrey' |
82 | 82 | /> |
83 | 83 | |
84 | 84 | <text_color id = 'color_alternative_disabled' |
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index beff013..f646ecf 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummmodern/scummmodern_gfx.stx b/gui/themes/scummmodern/scummmodern_gfx.stx
index 6a3ab0c..05a4599 100644
a
|
b
|
|
130 | 130 | /> |
131 | 131 | |
132 | 132 | <text_color id = 'color_alternative' |
133 | | color = 'black' |
| 133 | color = 'darkgray' |
134 | 134 | /> |
135 | 135 | |
136 | 136 | <text_color id = 'color_alternative_inverted' |
137 | | color = 'black' |
| 137 | color = 'white' |
138 | 138 | /> |
139 | 139 | |
140 | 140 | <text_color id = 'color_alternative_hover' |
141 | | color = 'bgreen' |
| 141 | color = 'darkgray' |
142 | 142 | /> |
143 | 143 | |
144 | 144 | <text_color id = 'color_alternative_disabled' |
145 | | color = '192, 192, 192' |
| 145 | color = 'darkgray' |
146 | 146 | /> |
147 | 147 | |
148 | 148 | <text_color id = 'color_button' |