explorer.position = game.things[game.player_id];
}
this.mode = mode_name;
+ this.empty_input();
this.full_refresh();
},
draw_history: function() {
return;
}
terminal.drawBox(this.height_turn_line, this.window_width, terminal.rows - this.height_turn_line - this.height_input, this.window_width);
- console.log(this.log);
for (let y = terminal.rows - this.height_input - this.height_turn_line,
i = this.log.length - 1;
y >= this.height_turn_line && i >= 0;
},
empty_input: function(str) {
this.input = "";
- this.recalc_input_lines();
+ if (this.mode == 'annotate' || this.mode == 'chat') {
+ this.recalc_input_lines();
+ } else {
+ this.height_input = 0;
+ }
},
add_to_input: function(str) {
if (this.input.length + str.length > this.window_width * terminal.rows) {
log_msg: function(msg) {
let lines = this.msg_into_lines_of_width(msg, this.window_width);
this.log = this.log.concat(lines);
- while (this.log.length > terminal.rows - 2) {
+ while (this.log.length > terminal.rows) {
this.log.shift();
};
this.draw_history();
tui.full_refresh();
} else if (event.key == 'Enter') {
explorer.annotate(tui.input);
- tui.empty_input();
tui.switch_mode('study', true);
}
}