version 1.6, 2017/06/30 22:24:08 |
version 1.7, 2017/06/30 22:36:11 |
|
|
each = sx / n; |
each = sx / n; |
if (each < 24) { |
if (each < 24) { |
n = (sx - 6) / 24; |
n = (sx - 6) / 24; |
|
if (n == 0) |
|
n = 1; |
each = (sx - 6) / n; |
each = (sx - 6) / n; |
left = sx - (n * each); |
left = sx - (n * each); |
|
|
|
|
screen_write_cursormove(ctx, sx - left + left / 2, sy / 2); |
screen_write_cursormove(ctx, sx - left + left / 2, sy / 2); |
screen_write_puts(ctx, &grid_default_cell, "..."); |
screen_write_puts(ctx, &grid_default_cell, "..."); |
|
|
if (sx == left) |
if (each == 0) |
return; |
return; |
left = 0; |
left = 0; |
} else |
} else |
|
|
xasprintf(&label, " %u ", wl->idx); |
xasprintf(&label, " %u ", wl->idx); |
len = strlen(label) / 2; |
len = strlen(label) / 2; |
screen_write_cursormove(ctx, i * each + each / 2 - len, sy / 2); |
screen_write_cursormove(ctx, i * each + each / 2 - len, sy / 2); |
screen_write_puts(ctx, &gc, "%s", label); |
if (len <= width) |
|
screen_write_puts(ctx, &gc, "%s", label); |
free(label); |
free(label); |
|
|
if (i != n - 1) { |
if (i != n - 1) { |
|
|
each = sx / n; |
each = sx / n; |
if (each < 24) { |
if (each < 24) { |
n = (sx - 6) / 24; |
n = (sx - 6) / 24; |
|
if (n == 0) |
|
n = 1; |
each = (sx - 6) / n; |
each = (sx - 6) / n; |
left = sx - (n * each); |
left = sx - (n * each); |
|
|
|
|
screen_write_cursormove(ctx, sx - left + left / 2, sy / 2); |
screen_write_cursormove(ctx, sx - left + left / 2, sy / 2); |
screen_write_puts(ctx, &grid_default_cell, "..."); |
screen_write_puts(ctx, &grid_default_cell, "..."); |
|
|
if (sx == left) |
if (each == 0) |
return; |
return; |
left = 0; |
left = 0; |
} else |
} else |
|
|
xasprintf(&label, " %u ", i); |
xasprintf(&label, " %u ", i); |
len = strlen(label) / 2; |
len = strlen(label) / 2; |
screen_write_cursormove(ctx, i * each + each / 2 - len, sy / 2); |
screen_write_cursormove(ctx, i * each + each / 2 - len, sy / 2); |
screen_write_puts(ctx, &gc, "%s", label); |
if (len <= width) |
|
screen_write_puts(ctx, &gc, "%s", label); |
free(label); |
free(label); |
|
|
if (i != n - 1) { |
if (i != n - 1) { |