Better highlight special publish/remove add-on options:

- Use special icons (Wesnoth icon with a green plus or a red minus)

- Color the text of the option in green/red
This commit is contained in:
Ali El Gariani 2008-07-06 23:50:31 +00:00
parent 10e76f2eb1
commit 0474395f0c
3 changed files with 8 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

@ -1406,13 +1406,17 @@ void game_controller::download_addons(std::string host)
std::string pub_option_text, del_option_text;
for(std::vector< std::string >::const_iterator j = publish_options.begin(); j != publish_options.end(); ++j) {
options.push_back(sep + _("Publish add-on: ") + *j);
options_to_filter.push_back(options.back());
static const std::string publish_icon = "icons/icon-addon-publish.png";
const std::string text = _("Publish add-on: ") + *j;
options.push_back(IMAGE_PREFIX + publish_icon + COLUMN_SEPARATOR + font::GOOD_TEXT + text);
options_to_filter.push_back(text);
}
for(std::vector< std::string >::const_iterator d = delete_options.begin(); d != delete_options.end(); ++d) {
options.push_back(sep + _("Delete add-on: ") + *d);
options_to_filter.push_back(options.back());
static const std::string delete_icon = "icons/icon-addon-delete.png";
const std::string text = _("Delete add-on: ") + *d;
options.push_back(IMAGE_PREFIX + delete_icon + COLUMN_SEPARATOR + font::BAD_TEXT + text);
options_to_filter.push_back(text);
}
if(campaigns.empty() && publish_options.empty()) {