tgame_load: manually truncate displayed name if too long
This commit is contained in:
parent
1a70c37a46
commit
6ae882838b
1 changed files with 4 additions and 1 deletions
|
@ -42,6 +42,7 @@
|
|||
#include "preferences_display.hpp"
|
||||
#include "savegame.hpp"
|
||||
#include "utils/foreach.tpp"
|
||||
#include "serialization/string_utils.hpp"
|
||||
|
||||
#include <cctype>
|
||||
#include <boost/bind.hpp>
|
||||
|
@ -176,7 +177,9 @@ void tgame_load::fill_game_list(twindow& window,
|
|||
std::map<std::string, string_map> data;
|
||||
string_map item;
|
||||
|
||||
item["label"] = game.name();
|
||||
std::string name = game.name();
|
||||
utils::ellipsis_truncate(name, 50);
|
||||
item["label"] = name;
|
||||
data.insert(std::make_pair("filename", item));
|
||||
|
||||
item["label"] = game.format_time_summary();
|
||||
|
|
Loading…
Add table
Reference in a new issue