From: Christian Heller Date: Sun, 22 Nov 2020 03:25:30 +0000 (+0100) Subject: Minor refactor. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=196af065fb3b232ab863303dc9d0b8acc1b062bb;p=plomrogue2 Minor refactor. --- diff --git a/rogue_chat_nocanvas_monochrome.html b/rogue_chat_nocanvas_monochrome.html index 4ea33d6..1058663 100644 --- a/rogue_chat_nocanvas_monochrome.html +++ b/rogue_chat_nocanvas_monochrome.html @@ -599,16 +599,8 @@ let tui = { } 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') {