From: Christian Heller Date: Tue, 27 Oct 2020 06:03:45 +0000 (+0100) Subject: Add shortcuts for commands to leave chat mode. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Bdb.prefix%7D%7D/test?a=commitdiff_plain;h=47e43a5b4f32159302be343648e0027f2e01ca5a;p=plomrogue2-experiments Add shortcuts for commands to leave chat mode. --- diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html index c5a4a1f..db7e303 100644 --- a/new2/rogue_chat_nocanvas_monochrome.html +++ b/new2/rogue_chat_nocanvas_monochrome.html @@ -221,8 +221,8 @@ let tui = { 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("/study - switch to study mode"); + tui.log_msg("/play or /p - switch to play mode"); + tui.log_msg("/study or /s - switch to study mode"); tui.log_msg(""); tui.log_msg("play mode commands:"); tui.log_msg("w, a, s, d - move avatar"); @@ -395,9 +395,9 @@ document.addEventListener('keydown', (event) => { let [tokens, token_starts] = parser.tokenize(tui.input_line); if (tokens.length > 0 && tokens[0].length > 0) { if (tokens[0][0] == '/') { - if (tokens[0] == '/play') { + if (tokens[0] == '/play' || tokens[0] == '/p') { tui.switch_mode('play'); - } else if (tokens[0] == '/study') { + } else if (tokens[0] == '/study' || tokens[0] == '/s') { tui.switch_mode('study'); } else if (tokens[0] == '/help') { tui.log_help();