+ unsigned num_scores = group.players[0].scores.size();
+ unsigned show_players = get_show_players(group);
+ unsigned y = (show_players <= 7) ? 140 : (140 - (show_players - 7) * 5);
+
+ unsigned row = 0, m = 0, x;
+ for (std::vector<Player>::const_iterator i = group.players.begin(); i != group.players.end() && row < 9; ++i) {
+ if (m++ % num_machines != machine)
+ continue;
+
+ my_draw_text_deferred(td, i->nick, 18.0, 20, y);
+
+ x = 40 + colwidth[0];
+
+ unsigned col = 1;
+ for (std::vector<Score>::const_iterator j = i->scores.begin(); j != i->scores.end(); ++j, ++col) {
+ char text[16] = "";
+ if (j->score != -1) {
+ std::sprintf(text, "%u", j->score);
+ }
+
+ unsigned this_width = my_draw_text(text, NULL, 22.0);
+ if (j->chosen) {
+ my_draw_text_deferred(td, text, 22.0, x + max_num_width - this_width, y);
+
+ // draw the long name if we can, otherwise use the short one
+ if (my_draw_text(j->song.title, NULL, 12.0) > (colwidth[col] - 10 - max_num_width)) {
+ my_draw_text_deferred(td, j->song.short_title, 12.0, x + max_num_width + 10, y);
+ } else {
+ my_draw_text_deferred(td, j->song.title, 12.0, x + max_num_width + 10, y);
+ }
+ } else {
+ my_draw_text_deferred(td, text, 22.0, x + colwidth[col] / 2 - this_width / 2, y);
+ }
+ x += colwidth[col] + 20;
+ }