X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_free?a=blobdiff_plain;f=rogue_chat_nocanvas_monochrome.html;h=59d03a98141cda17de586e956b1abd6d88bf8dff;hb=600df1cb4f785eeeb0d604a2d7b6e08d41dd652c;hp=381b0f2c3679a0c146dddac02caa69f6037a8f80;hpb=69ad51772914eee6255ae185507f4ea1406f8795;p=plomrogue2
diff --git a/rogue_chat_nocanvas_monochrome.html b/rogue_chat_nocanvas_monochrome.html
index 381b0f2..59d03a9 100644
--- a/rogue_chat_nocanvas_monochrome.html
+++ b/rogue_chat_nocanvas_monochrome.html
@@ -1,30 +1,37 @@
-
for mouse players
+
source code (includes proper terminal / curses client)
+
button controls for mouse players
- |
- |
+ |
+ |
|
- |
- MOVE |
+ |
+ move |
|
|
- |
+ |
|
@@ -167,8 +174,7 @@ let key_selectors = document.querySelectorAll('[id^="key_"]');
for (const key_switch_selector of document.querySelectorAll('[id^="key_switch_to_"]')) {
const action = key_switch_selector.id.slice("key_switch_to_".length);
- const msg = "[" + mode_helps[action].short + "]: ";
- key_switch_selector.parentNode.prepend(msg);
+ key_switch_selector.parentNode.prepend(mode_helps[action].short + ': ');
}
function restore_selector_value(selector) {
@@ -550,13 +556,26 @@ let tui = {
for (let key_selector of key_selectors) {
this.keys[key_selector.id.slice(4)] = key_selector.value;
}
- this.movement_keys = {
- [this.keys.square_move_up]: 'UP',
- [this.keys.square_move_left]: 'LEFT',
- [this.keys.square_move_down]: 'DOWN',
- [this.keys.square_move_right]: 'RIGHT'
- };
- if (game.map_geometry == 'Hex') {
+ if (game.map_geometry == 'Square') {
+ this.movement_keys = {
+ [this.keys.square_move_up]: 'UP',
+ [this.keys.square_move_left]: 'LEFT',
+ [this.keys.square_move_down]: 'DOWN',
+ [this.keys.square_move_right]: 'RIGHT'
+ };
+ document.getElementById("move_upright").hidden = true;
+ document.getElementById("move_upleft").hidden = true;
+ document.getElementById("move_downright").hidden = true;
+ document.getElementById("move_downleft").hidden = true;
+ document.getElementById("move_up").hidden = false;
+ document.getElementById("move_down").hidden = false;
+ } else if (game.map_geometry == 'Hex') {
+ document.getElementById("move_upright").hidden = false;
+ document.getElementById("move_upleft").hidden = false;
+ document.getElementById("move_downright").hidden = false;
+ document.getElementById("move_downleft").hidden = false;
+ document.getElementById("move_up").hidden = true;
+ document.getElementById("move_down").hidden = true;
this.movement_keys = {
[this.keys.hex_move_upleft]: 'UPLEFT',
[this.keys.hex_move_upright]: 'UPRIGHT',
@@ -582,40 +601,13 @@ let tui = {
}
this.empty_input();
this.restore_input_values();
- document.getElementById("take_thing").disabled = true;
- document.getElementById("drop_thing").disabled = true;
- document.getElementById("flatten").disabled = true;
- document.getElementById("teleport").disabled = true;
- document.getElementById("toggle_map_mode").disabled = true;
- document.getElementById("switch_to_chat").disabled = true;
- document.getElementById("switch_to_play").disabled = true;
- document.getElementById("switch_to_study").disabled = true;
- document.getElementById("switch_to_edit").disabled = true;
- document.getElementById("switch_to_portal").disabled = true;
- document.getElementById("switch_to_annotate").disabled = true;
- document.getElementById("switch_to_password").disabled = true;
- document.getElementById("switch_to_admin").disabled = true;
- document.getElementById("switch_to_control_pw_type").disabled = true;
- document.getElementById("switch_to_control_tile_type").disabled = true;
- document.getElementById("move_left").disabled = true;
- document.getElementById("move_upleft").disabled = true;
- document.getElementById("move_up").disabled = true;
- document.getElementById("move_upright").disabled = true;
- document.getElementById("move_downleft").disabled = true;
- document.getElementById("move_down").disabled = true;
- document.getElementById("move_downright").disabled = true;
- document.getElementById("move_right").disabled = true;
+ for (let el of document.getElementsByTagName("button")) {
+ el.disabled = true;
+ }
+ document.getElementById("help").disabled = false;
if (this.mode.name == 'play' || this.mode.name == 'study' || this.mode.name == 'control_tile_draw') {
- document.getElementById("move_left").disabled = false;
- document.getElementById("move_right").disabled = false;
- if (game.map_geometry == 'Hex') {
- document.getElementById("move_upleft").disabled = false;
- document.getElementById("move_upright").disabled = false;
- document.getElementById("move_downleft").disabled = false;
- document.getElementById("move_downright").disabled = false;
- } else {
- document.getElementById("move_up").disabled = false;
- document.getElementById("move_down").disabled = false;
+ for (const move_key of document.querySelectorAll('[id^="move_"]')) {
+ move_key.disabled = false;
}
}
if (!this.mode.is_intro && this.mode.name != 'play') {