- refresh: function() {
- terminal.refresh();
- },
- log_help: function() {
- tui.log_msg("");
- tui.log_msg("HELP");
- tui.log_msg("chat mode commands:");
- tui.log_msg("");
- tui.log_msg("/login USER - register as USER");
- tui.log_msg("/msg USER TEXT - send TEXT to USER");
- tui.log_msg("/help - show this help");
- tui.log_msg("/play - switch to play mode");
- tui.log_msg("");
- tui.log_msg("play mode commands:");
- tui.log_msg("w, a, s, d - move avatar");
- tui.log_msg("f - flatten surroundings");
- tui.log_msg("e - write following ASCII character");
- tui.log_msg("c - switch to chat mode");
- tui.log_msg("? - switch to investigation mode");
- tui.log_msg("");
- tui.log_msg("investigation mode commands:");
- tui.log_msg("w, a, s, d - move question mark");
- tui.log_msg("A - annotate terrain");
- tui.log_msg("c - switch to chat mode");
- tui.log_msg("p - switch to play mode");
- tui.log_msg("");
- },
- draw_info: function() {
- terminal.drawBox(1, terminal.cols / 2, terminal.rows - 2, terminal.cols / 2);
- let lines = explorer.get_info();
- for (let y = 1, i = 0; y < terminal.rows && i < lines.length; y++, i++) {
- terminal.write(y, terminal.cols / 2, lines[i]);
+ draw_input: function() {
+ if (this.mode.has_input_prompt) {
+ for (let y = terminal.rows - this.height_input, i = 0; y < terminal.rows && i < this.input_lines.length; y++, i++) {
+ terminal.write(y, this.window_width, this.input_lines[i]);
+ }