X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/git-favicon.png?a=blobdiff_plain;f=rogue_chat.html;h=883afc9322ad994c260c3a422921f477c58fb2e7;hb=0482064116ed8cdc6cd969e2ca38380b41725cc4;hp=073874047d1529d3b17a52b02e387207a6e731a3;hpb=baab6e8ac2ff4215e6d57765c992b67134572dce;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index 0738740..883afc9 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -529,6 +529,7 @@ let server = { game.map_geometry = game.map_geometry_new; game.map_size = game.map_size_new; game.map = game.map_new; + game.fov = game.fov_new; tui.init_keys(); game.map_control = game.map_control_new; explorer.annotations = explorer.annotations_new; @@ -727,7 +728,6 @@ let tui = { this.mode_edit.available_actions = ["move", "flatten", "install", "toggle_map_mode"] this.inputEl = document.getElementById("input"); - this.inputEl.focus(); this.switch_mode('waiting_for_server'); this.recalc_input_lines(); this.height_header = this.height_turn_line + this.height_mode_line; @@ -820,9 +820,6 @@ let tui = { } else if (this.mode.name != "edit") { this.map_mode = 'terrain + things'; }; - if (this.mode.has_input_prompt || this.mode.is_single_char_entry) { - this.inputEl.focus(); - } if (game.player_id in game.things && (this.mode.shows_info || this.mode.name == 'control_tile_draw')) { explorer.position = game.player.position; } @@ -1715,12 +1712,12 @@ window.setInterval(function() { }, 1000); window.setInterval(function() { if (document.activeElement.tagName.toLowerCase() != 'input') { + const scroll_x = window.scrollX; + const scroll_y = window.scrollY; tui.inputEl.focus(); + window.scrollTo(scroll_x, scroll_y); }; }, 100); -document.getElementById("terminal").onclick = function() { - tui.inputEl.focus(); -}; document.getElementById("help").onclick = function() { tui.show_help = true; tui.full_refresh();