summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/web_scoreboard.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c
index e79d104..2916ae8 100644
--- a/web/web_scoreboard.c
+++ b/web/web_scoreboard.c
@@ -296,14 +296,14 @@ void draw_visits_dense()
struct dom_elem **elemv = malloc(
(np * 2 + 1) * (2 * n_visits + 2) * sizeof(*elemv));
int elemc = 0;
+ char buf[32], buf2[32];
elemv[elemc++] = create_div("", "");
for (int i = 0; i < np; ++i) {
- elemv[elemc++] = create_div(state->legs[i]->name,
- "visit-name");
+ sprintf(buf, "visit-name visit-name-%d", i + 1);
+ elemv[elemc++] = create_div(state->legs[i]->name, buf);
}
- char buf[32], buf2[32];
elemv[elemc++] = create_div("0", "visit-n");
for (int i = 0; i < np; ++i) {
if (i + 1 == match_opts->throws_first)
@@ -371,6 +371,9 @@ void draw_visits_dense()
free(elemv);
dom_scroll_to_bottom("#visits");
+ int pn = match_is_over() ? state->active_player : match_next_player();
+ sprintf(buf, ".visit-name-%d", pn);
+ dom_scroll_to_center_child("#visits", buf);
}
void draw_visits()