map_y += 1
def draw_help():
- content = "%s mode help (hit any key to disappear)\n\n%s\n\n" % (self.mode.name,
- self.mode.help_intro)
+ content = "%s mode help\n\n%s\n\n" % (self.mode.name,
+ self.mode.help_intro)
if self.mode == self.mode_play:
content += "Available actions:\n"
if 'MOVE' in self.game.tasks:
},
draw_help: function() {
let movement_keys_desc = Object.keys(this.movement_keys).join(',');
- let content = this.mode.name + " mode help (hit any key to disappear)\n\n" + this.mode.help_intro + "\n\n";
+ let content = this.mode.name + " mode help\n\n" + this.mode.help_intro + "\n\n";
if (this.mode == mode_play) {
content += "Available actions:\n";
if (game.tasks.includes('MOVE')) {
if (target) {
this.position = target
this.query_info();
- tui.full_refresh();
} else {
terminal.blink_screen();
};
tui.inputEl.value = tui.inputEl.value.slice(0, max_length);
};
tui.recalc_input_lines();
- tui.full_refresh();
} else if (tui.mode == mode_edit && tui.inputEl.value.length > 0) {
server.send(["TASK:WRITE", tui.inputEl.value[0], tui.password]);
tui.switch_mode(mode_play);
- } else if (tui.mode == mode_teleport) {
- if (['Y', 'y'].includes(tui.inputEl.value[0])) {
- server.reconnect_to(tui.teleport_target);
- } else {
- tui.log_msg("@ teleportation aborted");
- tui.switch_mode(mode_play);
- }
}
+ tui.full_refresh();
}, false);
tui.inputEl.addEventListener('keydown', (event) => {
tui.show_help = false;
tui.show_help = true;
tui.empty_input();
tui.restore_input_values();
- tui.full_refresh();
} else if (!tui.mode.has_input_prompt && event.key == tui.keys.help) {
tui.show_help = true;
- tui.full_refresh();
} else if (tui.mode == mode_login && event.key == 'Enter') {
tui.login_name = tui.inputEl.value;
server.send(['LOGIN', tui.inputEl.value]);
server.send(['ALL', tui.inputEl.value]);
}
tui.empty_input();
- tui.full_refresh();
} else if (tui.mode == mode_play) {
if (event.key === tui.keys.switch_to_chat) {
event.preventDefault();
} else {
tui.map_mode = 'terrain';
}
- tui.full_refresh();
};
}
+ tui.full_refresh();
}, false);
rows_selector.addEventListener('input', function() {