鼠标松开时如果有选中的控件就不触发场景的鼠标松开/点击事件

This commit is contained in:
MrZ626
2021-08-01 00:44:09 +08:00
parent 3ccc8cdd7b
commit 3bd6da6276

View File

@@ -149,10 +149,13 @@ end
function love.mousereleased(x,y,k,touch)
if touch or SCN.swapping then return end
mx,my=ITP(xOy,x,y)
WIDGET.release(mx,my)
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)
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
end
end
function love.wheelmoved(x,y)