Author: alink
Date: Sun Jul 6 23:49:23 2008
New Revision: 27799
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27799&view=rev
Log:
Use multline for the new traits column in the recall dialog:
- allow to reduce width, maybe needed for big names and small screens
- easier to identify traits and compare units (all traits are left-aligned)
- provide simple and clean support for "gifted" units (no problem for 4 traits,
then just increase the row height)
- but maybe look a bit uneven, so I am still not sure about this.
Modified:
trunk/src/menu_events.cpp
Modified: trunk/src/menu_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/menu_events.cpp?rev=27799&r1=27798&r2=27799&view=diff
==============================================================================
--- trunk/src/menu_events.cpp (original)
+++ trunk/src/menu_events.cpp Sun Jul 6 23:49:23 2008
@@ -995,8 +995,13 @@
option_to_filter << u->type_name() << " " <<
name << " " << u->level();
#ifndef USE_TINY_GUI
- option << COLUMN_SEPARATOR <<
u->traits_description();
- option_to_filter << " " <<
u->traits_description();
+ option << COLUMN_SEPARATOR;
+ const std::vector<std::string> traits =
+
utils::split(std::string(u->traits_description()), ',');
+ foreach(const std::string& trait, traits) {
+ option << trait << '\n';
+ option_to_filter << " " << trait;
+ }
#endif
options.push_back(option.str());
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits