From: Christian Heller Date: Mon, 30 Nov 2020 23:57:26 +0000 (+0100) Subject: Fix intro button display. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/conditions?a=commitdiff_plain;h=33adc215597b0fd7553661891a3c84ce16f1955e;p=plomrogue2 Fix intro button display. --- diff --git a/rogue_chat.html b/rogue_chat.html index f245644..3825581 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -20,7 +20,7 @@ terminal rows: keyboard input/control:

button controls for mouse players

- +
@@ -625,15 +625,16 @@ let tui = { this.init_keys(); }, init_keys: function() { + document.getElementById("move_table").hidden = true; this.keys = {}; for (let key_selector of key_selectors) { this.keys[key_selector.id.slice(4)] = key_selector.value; } this.movement_keys = {}; - if (!game.map_geometry) { - return; + let geometry_prefix = 'undefinedMapGeometry_'; + if (game.map_geometry) { + geometry_prefix = game.map_geometry.toLowerCase() + '_'; } - let geometry_prefix = game.map_geometry.toLowerCase() + '_'; for (const key_name of Object.keys(key_descriptions)) { if (key_name.startsWith(geometry_prefix)) { let direction = key_name.split('_')[2].toUpperCase(); @@ -645,6 +646,7 @@ let tui = { move_button.hidden = true; }; for (const move_button of document.querySelectorAll('[id^="' + geometry_prefix + 'move_"]')) { + document.getElementById("move_table").hidden = false; move_button.hidden = false; }; for (let el of document.getElementsByTagName("button")) {