From 057bab8ea39677e1c5fb96fa4bfd24bf0eb4bd6a Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sat, 24 Jul 2021 22:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80=E5=95=86=E5=BA=97=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=95=BF=E6=8C=89=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/plugins.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/project/plugins.js b/project/plugins.js index db0e75c2..f8cc4768 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -256,6 +256,19 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = return false; }, 60); + // 允许长按屏幕连续执行操作 + core.registerAction('longClick', 'shops', function (x, y, px, py) { + if (!core.status.lockControl || !core.hasFlag("@temp@shop") || core.status.event.id != 'action') return false; + if (core.status.event.data.type != 'choices') return false; + var data = core.status.event.data.current; + var choices = data.choices; + var topIndex = core.actions.HSIZE - parseInt((choices.length - 1) / 2) + (core.status.event.ui.offset || 0); + if (x >= core.actions.CHOICES_LEFT && x <= core.actions.CHOICES_RIGHT && y >= topIndex && y < topIndex + choices.length) { + core.actions._clickAction(x, y); + return true; + } + return false; + }, 60); }, "removeMap": function () { // 高层塔砍层插件,删除后不会存入存档,不可浏览地图也不可飞到。