From ca2674c263aebd38b15a28bc389646763b525886 Mon Sep 17 00:00:00 2001 From: bdf1 Date: Sun, 15 Sep 2024 12:13:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E8=BE=B9=E6=A1=86=E5=AF=BC=E8=87=B4=E7=82=B9=E5=87=BB=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E4=BD=8D=E7=BD=AE=E5=81=8F=E7=A7=BB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/plugins.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/project/plugins.js b/project/plugins.js index f9662a9..069b5df 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -243,6 +243,23 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.statusBar.hard.style.display = 'block'; } } + core.actions._getClickLoc = function (x, y) { + + var statusBar = { 'x': 0, 'y': 0 }; + var size = 32; + size = size * core.domStyle.scale; + + if (core.domStyle.isVertical) { + + } else { + statusBar.x = core.dom.statusBar.offsetWidth; + } + + var left = core.dom.gameGroup.offsetLeft + statusBar.x; + var top = core.dom.gameGroup.offsetTop + statusBar.y; + var loc = { 'x': Math.max(x - left), 'y': Math.max(y - top), 'size': size }; + return loc; + } }, "drawLight": function () {