Skip to content

Commit

Permalink
Faction Select: sort displayed recruit list alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Oct 17, 2016
1 parent 1402c9a commit 5296254
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/dialogs/multiplayer/faction_select.cpp
Expand Up @@ -161,6 +161,10 @@ void tfaction_select::on_faction_select(twindow& window)
}
}

std::sort(recruit_names.begin(), recruit_names.end(), [](const std::string& s1, const std::string& s2) {
return translation::compare(s1, s2) < 0;
});

find_widget<tcontrol>(&window, "recruits", false).set_label(utils::join(recruit_names, "\n"));
}

Expand Down

0 comments on commit 5296254

Please sign in to comment.