for (const player of players) {
let name = player.name_;
const offset_y = y - shrink_offset;
- const max_len = Math.max(4, (tui.left_window_width / 2) - (offset_y * 2) - 8);
+ const max_len = Math.max(5, (tui.left_window_width / 2) - (offset_y * 2) - 8);
if (name.length > max_len) {
- name = name.slice(0, max_len) + '…';
+ name = name.slice(0, max_len - 1) + '…';
}
terminal.write(y, 0, '@' + player.thing_char + ':' + name);
y += 1;
}
terminal.write(terminal.rows - 2, start_x, '----------');
let name = t.name_;
- if (name.length > 6) {
+ if (name.length > 7) {
name = name.slice(0, 6) + '…';
}
terminal.write(terminal.rows - 1, start_x, '@' + t.thing_char + ':' + name);
y = 0
for t in players:
offset_y = y - shrink_offset
- max_len = max(4, (self.left_window_width // 2) - (offset_y * 2) - 8)
+ max_len = max(5, (self.left_window_width // 2) - (offset_y * 2) - 8)
name = t.name[:]
if len(name) > max_len:
- name = name[:max_len] + '…'
+ name = name[:max_len - 1] + '…'
safe_addstr(y, 0, '@%s:%s' % (t.thing_char, name))
y += 1
if y >= self.size.y:
draw_body_part(t.hat, self.size.y - 6)
safe_addstr(self.size.y - 2, start_x, '----------')
name = t.name[:]
- if len(name) > 6:
- name = name[:6] + '…'
+ if len(name) > 7:
+ name = name[:6 - 1] + '…'
safe_addstr(self.size.y - 1, start_x,
'@%s:%s' % (t.thing_char, name))