修复松开鼠标可能不触发场景内事件

This commit is contained in:
MrZ626
2021-08-04 20:15:15 +08:00
parent 60600dbe2f
commit f088bdcf8b

View File

@@ -149,10 +149,10 @@ end
function love.mousereleased(x,y,k,touch)
if touch or SCN.swapping then return end
mx,my=ITP(xOy,x,y)
if SCN.mouseUp then SCN.mouseUp(mx,my,k)end
if WIDGET.sel then
WIDGET.release(mx,my)
else
if SCN.mouseUp then SCN.mouseUp(mx,my,k)end
if lastX and SCN.mouseClick and(mx-lastX)^2+(my-lastY)^2<62 then
SCN.mouseClick(mx,my,k)
end