Author: alink
Date: Mon Jul 7 01:50:31 2008
New Revision: 27805
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27805&view=rev
Log:
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
Added:
trunk/images/icons/icon-addon-delete.png (with props)
trunk/images/icons/icon-addon-publish.png (with props)
Modified:
trunk/src/game.cpp
Added: trunk/images/icons/icon-addon-delete.png
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/images/icons/icon-addon-delete.png?rev=27805&view=auto
==============================================================================
Binary file - no diff available.
Propchange: trunk/images/icons/icon-addon-delete.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: trunk/images/icons/icon-addon-publish.png
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/images/icons/icon-addon-publish.png?rev=27805&view=auto
==============================================================================
Binary file - no diff available.
Propchange: trunk/images/icons/icon-addon-publish.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: trunk/src/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=27805&r1=27804&r2=27805&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Mon Jul 7 01:50:31 2008
@@ -1406,13 +1406,17 @@
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()) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits