From a74756a376e755034b2f61eb7807224cf2e0799d Mon Sep 17 00:00:00 2001 From: strawberry42271 <2806566736@qq.com> Date: Tue, 3 Dec 2024 15:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=89=E6=A0=87=E5=A2=9E=E5=8A=A0=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=81=8F=E7=A7=BB=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/plugins.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project/plugins.js b/project/plugins.js index 66c5ba7..3228abb 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -8876,8 +8876,8 @@ core.plugin.animate = { }, "光标设置": function () { // 在此增加新插件 - this.changeMouse = function (icon, div = 'gameGroup', translateX = 0, translateY = 0, scaleX = 1, scaleY = 1, degree = 0) { - const canvas = document.createElement('canvas'); //CGui画布设置 + this.changeMouse = function (icon, div = 'gameGroup', translateX = 0, translateY = 0, scaleX = 1, scaleY = 1, degree = 0, px = 0, py = 0) { + const canvas = document.createElement('canvas'); canvas.width = 64 canvas.height = 64 @@ -8890,10 +8890,10 @@ core.plugin.animate = { core.drawIcon(ctx, icon, 0, 0, 32, 32) const data = canvas.toDataURL("image/png") - core.dom[div].style.cursor = `url(${data}),auto` //div为你要改变光标的元素,默认为包含状态栏的整个游戏画面 + core.dom[div].style.cursor = `url(${data}) ${px} ${py},url(${data}),auto` //div为你要改变光标的元素,默认为包含状态栏的整个游戏画面,px/py为点击点偏移像素 } this.removeMouse = function (div = 'gameGroup') { - core.dom[div].style.cursor = '' + core.dom[div].style.cursor = 'auto' } } } \ No newline at end of file