home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In web client, enforce terminal size restrictions harder.
[plomrogue2]
/
rogue_chat_nocanvas_monochrome.html
diff --git
a/rogue_chat_nocanvas_monochrome.html
b/rogue_chat_nocanvas_monochrome.html
index 0890647eb7d288081664946aea3e6394f02a7d49..d6e8a6ed3798cbf8165ba1333206de5646bec220 100644
(file)
--- a/
rogue_chat_nocanvas_monochrome.html
+++ b/
rogue_chat_nocanvas_monochrome.html
@@
-4,8
+4,8
@@
</style>
</head><body>
<div>
</style>
</head><body>
<div>
-terminal rows: <input id="n_rows" type="number" step=4 min=
8
value=24 />
-terminal columns: <input id="n_cols" type="number" step=4 min=
2
0 value=80 />
+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=
8
0 value=80 />
</div>
<pre id="terminal" style="display: inline-block;"></pre>
<textarea id="input" style="opacity: 0; width: 0px;"></textarea>
</div>
<pre id="terminal" style="display: inline-block;"></pre>
<textarea id="input" style="opacity: 0; width: 0px;"></textarea>
@@
-279,6
+279,7
@@
let server = {
} else if (tokens[0] === 'UNHANDLED_INPUT') {
tui.log_msg('? unknown command');
} else if (tokens[0] === 'PLAY_ERROR') {
} else if (tokens[0] === 'UNHANDLED_INPUT') {
tui.log_msg('? unknown command');
} else if (tokens[0] === 'PLAY_ERROR') {
+ tui.log_msg('? ' + tokens[1]);
terminal.blink_screen();
} else if (tokens[0] === 'ARGUMENT_ERROR') {
tui.log_msg('? syntax error: ' + tokens[1]);
terminal.blink_screen();
} else if (tokens[0] === 'ARGUMENT_ERROR') {
tui.log_msg('? syntax error: ' + tokens[1]);
@@
-967,7
+968,7
@@
tui.inputEl.addEventListener('keydown', (event) => {
}, false);
rows_selector.addEventListener('input', function() {
}, false);
rows_selector.addEventListener('input', function() {
- if (rows_selector.value % 4 != 0) {
+ if (rows_selector.value % 4 != 0
|| rows_selector.value < 24
) {
return;
}
window.localStorage.setItem(rows_selector.id, rows_selector.value);
return;
}
window.localStorage.setItem(rows_selector.id, rows_selector.value);
@@
-975,7
+976,7
@@
rows_selector.addEventListener('input', function() {
tui.full_refresh();
}, false);
cols_selector.addEventListener('input', function() {
tui.full_refresh();
}, false);
cols_selector.addEventListener('input', function() {
- if (cols_selector.value % 4 != 0) {
+ if (cols_selector.value % 4 != 0
|| cols_selector.value < 80
) {
return;
}
window.localStorage.setItem(cols_selector.id, cols_selector.value);
return;
}
window.localStorage.setItem(cols_selector.id, cols_selector.value);