diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index 7551aca..6f4fd25 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 ColorList *colors) { |
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 | _listColors.clear(); |
| 154 | |
| 155 | if (colors) { |
| 156 | _listColors = *colors; |
| 157 | assert(_listColors.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, ThemeEngine::FontColor color) { |
| 172 | if (_dataList.size() == _listColors.size()) { |
| 173 | // If the color list has the size of the data list, we append the color. |
| 174 | _listColors.push_back(color); |
| 175 | } else if (!_listColors.size() && color != ThemeEngine::kFontColorNormal) { |
| 176 | // If it's the first entry to use a non default color, we will fill |
| 177 | // up all other entries of the color list with the default color and |
| 178 | // add the requested color for the new entry. |
| 179 | for (uint i = 0; i < _dataList.size(); ++i) |
| 180 | _listColors.push_back(ThemeEngine::kFontColorNormal); |
| 181 | _listColors.push_back(color); |
| 182 | } |
| 183 | |
166 | 184 | _dataList.push_back(s); |
167 | 185 | _list.push_back(s); |
168 | 186 | |
… |
… |
void ListWidget::drawWidget() {
|
431 | 449 | |
432 | 450 | int width; |
433 | 451 | |
| 452 | ThemeEngine::FontColor color = ThemeEngine::kFontColorNormal; |
| 453 | |
| 454 | if (!_listColors.empty()) { |
| 455 | if (_filter.empty() || _selectedItem == -1) |
| 456 | color = _listColors[pos]; |
| 457 | else |
| 458 | color = _listColors[_listIndex[pos]]; |
| 459 | } |
| 460 | |
434 | 461 | if (_selectedItem == pos && _editMode) { |
435 | 462 | buffer = _editString; |
436 | 463 | adjustOffset(); |
437 | 464 | width = _w - r.left - _hlRightPadding - _leftPadding - scrollbarW; |
438 | | 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); |
| 465 | g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 2), buffer, _state, |
| 466 | Graphics::kTextAlignLeft, inverted, pad, true, ThemeEngine::kFontStyleBold, color); |
440 | 467 | } else { |
441 | 468 | buffer = _list[pos]; |
442 | 469 | width = _w - r.left - scrollbarW; |
443 | | 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); |
| 470 | g_gui.theme()->drawText(Common::Rect(_x + r.left, y, _x + r.left + width, y + fontHeight - 2), buffer, _state, |
| 471 | Graphics::kTextAlignLeft, inverted, pad, true, ThemeEngine::kFontStyleBold, color); |
445 | 472 | } |
446 | 473 | |
447 | 474 | _textWidth[i] = width; |
diff --git a/gui/ListWidget.h b/gui/ListWidget.h
index 203cd88..1ee6a94 100644
a
|
b
|
|
28 | 28 | #include "gui/editable.h" |
29 | 29 | #include "common/str.h" |
30 | 30 | |
| 31 | #include "gui/ThemeEngine.h" |
| 32 | |
31 | 33 | namespace GUI { |
32 | 34 | |
33 | 35 | class ScrollBarWidget; |
… |
… |
class ListWidget : public EditableWidget {
|
51 | 53 | public: |
52 | 54 | typedef Common::String String; |
53 | 55 | typedef Common::StringList StringList; |
| 56 | typedef Common::Array<ThemeEngine::FontColor> ColorList; |
54 | 57 | protected: |
55 | 58 | StringList _list; |
56 | 59 | StringList _dataList; |
| 60 | ColorList _listColors; |
57 | 61 | Common::Array<int> _listIndex; |
58 | 62 | bool _editable; |
59 | 63 | bool _editMode; |
… |
… |
public:
|
87 | 91 | |
88 | 92 | virtual Widget *findWidget(int x, int y); |
89 | 93 | |
90 | | void setList(const StringList &list); |
91 | | void append(const String &s); |
| 94 | void setList(const StringList &list, const ColorList *colors = 0); |
| 95 | void append(const String &s, ThemeEngine::FontColor color = ThemeEngine::kFontColorNormal); |
92 | 96 | const StringList &getList() const { return _dataList; } |
93 | 97 | int getSelected() const { return (_filter.empty() || _selectedItem == -1) ? _selectedItem : _listIndex[_selectedItem]; } |
94 | 98 | void setSelected(int item); |
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index ce700c1..dc1b1b4 100644
a
|
b
|
void SaveLoadChooser::updateSaveList() {
|
316 | 316 | int curSlot = 0; |
317 | 317 | int saveSlot = 0; |
318 | 318 | StringList saveNames; |
| 319 | ListWidget::ColorList colors; |
319 | 320 | for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) { |
320 | 321 | // Handle gaps in the list of save games |
321 | 322 | saveSlot = atoi(x->save_slot().c_str()); |
… |
… |
void SaveLoadChooser::updateSaveList() {
|
324 | 325 | SaveStateDescriptor dummySave(curSlot, ""); |
325 | 326 | _saveList.insert_at(curSlot, dummySave); |
326 | 327 | saveNames.push_back(dummySave.description()); |
| 328 | colors.push_back(ThemeEngine::kFontColorNormal); |
327 | 329 | curSlot++; |
328 | 330 | } |
329 | 331 | |
… |
… |
void SaveLoadChooser::updateSaveList() {
|
338 | 340 | Common::String description = x->description(); |
339 | 341 | Common::String trimmedDescription = description; |
340 | 342 | trimmedDescription.trim(); |
341 | | if (trimmedDescription.empty()) |
| 343 | if (trimmedDescription.empty()) { |
342 | 344 | description = "Untitled savestate"; |
| 345 | colors.push_back(ThemeEngine::kFontColorAlternate); |
| 346 | } else { |
| 347 | colors.push_back(ThemeEngine::kFontColorNormal); |
| 348 | } |
343 | 349 | |
344 | 350 | saveNames.push_back(description); |
345 | 351 | curSlot++; |
… |
… |
void SaveLoadChooser::updateSaveList() {
|
351 | 357 | saveNames.push_back(emptyDesc); |
352 | 358 | SaveStateDescriptor dummySave(i, ""); |
353 | 359 | _saveList.push_back(dummySave); |
| 360 | colors.push_back(ThemeEngine::kFontColorNormal); |
354 | 361 | } |
355 | 362 | |
356 | | _list->setList(saveNames); |
| 363 | _list->setList(saveNames, &colors); |
357 | 364 | } |
358 | 365 | |
359 | 366 | } // 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..60a3e0d 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 7e693c3..1426bf1 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' |