From: Christian Heller Date: Tue, 27 Oct 2020 02:18:57 +0000 (+0100) Subject: Add basic explore mode info screen. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/pick_tasks?a=commitdiff_plain;h=4eee27cda6fbfae7a79709300512b0651f99fcaf;p=plomrogue2-experiments Add basic explore mode info screen. --- diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html index 906a154..6fee53c 100644 --- a/new2/rogue_chat_nocanvas_monochrome.html +++ b/new2/rogue_chat_nocanvas_monochrome.html @@ -181,8 +181,8 @@ let tui = { let chunk = ""; for (let i = 0, x = 0; i < msg.length; i++, x++) { if (x >= line_length) { - chat.history.unshift(' '.repeat(indent) + chunk); - chunk = ""; + chat.history.unshift(' '.repeat(indent) + chunk); + chunk = ""; x = 0; }; chunk += msg[i]; @@ -204,14 +204,27 @@ let tui = { tui.log_msg("/login USER - register as USER", 3); tui.log_msg("/msg USER TEXT - send TEXT to USER", 3); tui.log_msg("/help - show this help", 3); - tui.log_msg("/play - switch to game mode", 3); + tui.log_msg("/play - switch to play mode", 3); tui.log_msg(""); - tui.log_msg("map mode commands:", 1); + tui.log_msg("play mode commands:", 1); tui.log_msg("w, a, s, d - move avatar", 3); tui.log_msg("f - flatten surroundings", 3); tui.log_msg("e - write following ASCII character", 3); tui.log_msg("c - switch to chat mode", 3); + tui.log_msg("? - switch to explore mode", 3); tui.log_msg(""); + tui.log_msg("explore mode commands:", 1); + tui.log_msg("w, a, s, d - move question mark", 3); + tui.log_msg("c - switch to chat mode", 3); + tui.log_msg("p - switch to play mode", 3); + tui.log_msg(""); + }, + draw_info: function() { + terminal.drawBox(0, terminal.cols / 2, terminal.rows, terminal.cols / 2); + let lines = ['unfinished info screen']; + for (let y = 0, i = 0; y < terminal.rows && i < lines.length; y++, i++) { + terminal.write(y, terminal.cols / 2, lines[i]); + } }, full_refresh: function() { this.draw_map(); @@ -300,6 +313,7 @@ let explorer = { && !(try_pos[1] >= game.map_size[1])) { this.position = try_pos; tui.draw_map(); + tui.draw_info(); tui.refresh(); } }