tunit_preview_pane: made use of utils::join for minimal labels
This commit is contained in:
parent
7bfd1ab973
commit
0193618052
1 changed files with 1 additions and 10 deletions
|
@ -271,16 +271,7 @@ void tunit_preview_pane::set_displayed_unit(const unit* unit)
|
|||
|
||||
str << unit->alignment() << "\n";
|
||||
|
||||
std::string traits;
|
||||
for(const std::string& trait : unit->trait_names()) {
|
||||
traits += (traits.empty() ? "" : ", ") + trait;
|
||||
}
|
||||
|
||||
if(traits.empty()) {
|
||||
traits = " ";
|
||||
}
|
||||
|
||||
str << traits << "\n";
|
||||
str << utils::join(unit->trait_names(), ", ") << "\n";
|
||||
|
||||
str << font::span_color(unit->hp_color())
|
||||
<< _("HP: ") << unit->hitpoints() << "/" << unit->max_hitpoints() << "</span>" << "\n";
|
||||
|
|
Loading…
Add table
Reference in a new issue