修复自定义场地界面按超过第三个的鼠标键会报错

This commit is contained in:
MrZ626
2021-12-11 19:38:24 +08:00
parent 5c7082e886
commit 30748200dd

View File

@@ -140,6 +140,7 @@ function scene.mouseMove(x,y)
end end
end end
function scene.mouseDown(x,y,k) function scene.mouseDown(x,y,k)
if k>3 then return end
if not curPen then if not curPen then
curPen=k curPen=k
elseif curPen~=k then elseif curPen~=k then
@@ -149,6 +150,7 @@ function scene.mouseDown(x,y,k)
scene.mouseMove(x,y) scene.mouseMove(x,y)
end end
function scene.mouseUp(_,_,k) function scene.mouseUp(_,_,k)
if k>3 then return end
if curPen==k then if curPen==k then
_pDraw() _pDraw()
curPen=false curPen=false