- for (std::vector<Player>::const_iterator i = group.players.begin(); i != group.players.end(); ++i) {
- unsigned col = 1;
- width[0] = std::max(width[0], my_draw_text(i->nick, NULL, 18.0));
-
- for (std::vector<Score>::const_iterator j = i->scores.begin(); j != i->scores.end(); ++j, ++col) {
- if (j->chosen) {
- width[col] = std::max(width[col], my_draw_text(j->song.title, NULL, 12.0) +
- max_num_width + 10);
- } else {
- width[col] = std::max(width[col], my_draw_text(j->song.short_title, NULL, 12.0));
- width[col] = std::max(width[col], max_num_width);
+ unsigned mode;
+ for (mode = 0; mode < 2; ++mode) {
+ for (unsigned i = 0; i < 16; ++i)
+ width[i] = 0;
+
+ for (std::vector<Player>::const_iterator i = group.players.begin(); i != group.players.end(); ++i) {
+ unsigned col = 1;
+ width[0] = std::max(width[0], my_draw_text(i->nick, NULL, 18.0));
+
+ for (std::vector<Score>::const_iterator j = i->scores.begin(); j != i->scores.end(); ++j, ++col) {
+ if (j->chosen) {
+ width[col] = std::max(width[col], my_draw_text((mode == 0) ? j->song.title : j->song.short_title, NULL, 12.0) +
+ max_num_width + 10);
+ } else {
+ width[col] = std::max(width[col], my_draw_text(j->song.short_title, NULL, 12.0));
+ width[col] = std::max(width[col], max_num_width);
+ }