From: Christian Heller Date: Wed, 25 Nov 2020 04:28:34 +0000 (+0100) Subject: Display keyboard control hint in web client. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/decks/task?a=commitdiff_plain;h=de938984f8edbb39ddf1fc8062e836baa9ab4465;p=plomrogue2 Display keyboard control hint in web client. --- diff --git a/rogue_chat.html b/rogue_chat.html index 636773d..c10f7ca 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -11,12 +11,14 @@
terminal rows: -terminal columns: +· terminal columns: +· source code (includes proper terminal/ncurses client)

 
 
-source code (includes proper terminal / curses client) +keyboard input/control: +

button controls for mouse players

@@ -1377,6 +1379,15 @@ window.setInterval(function() { tui.log_msg('@ attempting reconnect …') } }, 5000); +window.setInterval(function() { + let val = "?"; + if (document.activeElement == tui.inputEl) { + val = "on (click outside terminal to change)"; + } else { + val = "off (click into terminal to change)"; + }; + document.getElementById("keyboard_control").textContent = val; +}, 100); document.getElementById("terminal").onclick = function() { tui.inputEl.focus(); };