Author: alink
Date: Sun Jul  6 22:14:44 2008
New Revision: 27797

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27797&view=rev
Log:
Add a "traits" column in the recall list dialog and allow filtering on it.
Seems just to fit in 800x600 and not activated for tiny gui (not tested yet)
but I will try to reduce its width. Thanks boucman for the idea.

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=27797&r1=27796&r2=27797&view=diff
==============================================================================
--- trunk/src/menu_events.cpp (original)
+++ trunk/src/menu_events.cpp Sun Jul  6 22:14:44 2008
@@ -963,9 +963,12 @@
                                        << COLUMN_SEPARATOR << _("Name")
                                        << COLUMN_SEPARATOR << _("Level")
                                        << COLUMN_SEPARATOR << _("XP");
+#ifndef USE_TINY_GUI
+                       heading << COLUMN_SEPARATOR << _("Traits");
+#endif 
 
                        gui::menu::basic_sorter sorter;
-                       
sorter.set_alpha_sort(1).set_alpha_sort(2).set_id_sort(3).set_numeric_sort(4);
+                       
sorter.set_alpha_sort(1).set_alpha_sort(2).set_id_sort(3).set_numeric_sort(4).set_alpha_sort(5);
 
                        options.push_back(heading.str());
                        options_to_filter.push_back(options.back());
@@ -983,14 +986,18 @@
                                        << name << COLUMN_SEPARATOR
                                        << u->level() << COLUMN_SEPARATOR
                                        << u->experience() << "/";
-
-                               if(u->can_advance() == false) {
-                                       option << "-";
-                               } else {
+                               if (u->can_advance())
                                        option << u->max_experience();
-                               }
+                               else
+                                       option <<  "-";
+                               
 
                                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();
+#endif
 
                                options.push_back(option.str());
                                
options_to_filter.push_back(option_to_filter.str());


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to