home
·
contact
·
privacy
projects
/
plomrogue2
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
abe1a5c
)
Display keyboard control hint in web client.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 25 Nov 2020 04:28:34 +0000
(
05:28
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 25 Nov 2020 04:28:34 +0000
(
05:28
+0100)
rogue_chat.html
patch
|
blob
|
history
diff --git
a/rogue_chat.html
b/rogue_chat.html
index 636773d9b8bbc672b76db1dec71b4920544ced02..c10f7caed0e92b78dc2220a59f27bee4db5ac97c 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-11,12
+11,14
@@
</head><body>
<div>
terminal rows: <input id="n_rows" type="number" step=4 min=24 value=24 />
</head><body>
<div>
terminal rows: <input id="n_rows" type="number" step=4 min=24 value=24 />
-terminal columns: <input id="n_cols" type="number" step=4 min=80 value=80 />
+· terminal columns: <input id="n_cols" type="number" step=4 min=80 value=80 />
+· <a href="https://plomlompom.com/repos/?p=plomrogue2;a=summary">source code</a> (includes proper terminal/ncurses client)
</div>
<pre id="terminal"></pre>
<textarea id="input" style="opacity: 0; width: 0px;"></textarea>
<div>
</div>
<pre id="terminal"></pre>
<textarea id="input" style="opacity: 0; width: 0px;"></textarea>
<div>
-<a href="https://plomlompom.com/repos/?p=plomrogue2;a=summary">source code</a> (includes proper terminal / curses client)
+keyboard input/control: <span id="keyboard_control"></span>
+</div>
<h3>button controls for mouse players</h3>
<table style="float: left">
<tr>
<h3>button controls for mouse players</h3>
<table style="float: left">
<tr>
@@
-1377,6
+1379,15
@@
window.setInterval(function() {
tui.log_msg('@ attempting reconnect …')
}
}, 5000);
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();
};
document.getElementById("terminal").onclick = function() {
tui.inputEl.focus();
};