From be2b27cf20c3d80da83709ed9827f415d2bebc37 Mon Sep 17 00:00:00 2001 From: Ali El Gariani Date: Sun, 6 Jul 2008 21:49:23 +0000 Subject: [PATCH] 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. --- src/menu_events.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/menu_events.cpp b/src/menu_events.cpp index a61c7f60884..63345a17846 100644 --- a/src/menu_events.cpp +++ b/src/menu_events.cpp @@ -995,8 +995,13 @@ private: 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 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());