X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/form?a=blobdiff_plain;f=rogue_chat.html;h=a09892dbc86576e8db2d437a29e22212e09508c2;hb=618cd58b293857779e6810ee9ca831a383822c66;hp=6497fa9a1832262b612abf203a9c06cdad0a7dfd;hpb=1ece82099bbf02faed3d1348d7014b8ed38528a9;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index 6497fa9..a09892d 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -813,7 +813,7 @@ let tui = { || !game.player.carrying.commandable)) { return fail('not carrying anything commandable'); } else if (mode_name == 'name_thing' && !game.player.carrying) { - return fail('not carrying anything to re-name'); + return fail('not carrying anything to re-name', 'edit'); } else if (mode_name == 'admin_thing_protect' && !game.player.carrying) { return fail('not carrying anything to protect') } else if (mode_name == 'take_thing' && game.player.carrying) { @@ -1768,7 +1768,10 @@ 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("help").onclick = function() { @@ -1804,6 +1807,9 @@ document.getElementById("install").onclick = function() { document.getElementById("wear").onclick = function() { server.send(['TASK:WEAR']); }; +document.getElementById("spin").onclick = function() { + server.send(['TASK:SPIN']); +}; document.getElementById("dance").onclick = function() { server.send(['TASK:DANCE']); };