调整触屏和控件交互的细节,滑条可以拖出范围但不失去焦点 close #279

This commit is contained in:
MrZ626
2021-09-11 04:39:45 +08:00
parent eb6f1718a8
commit 4de7ee4ce0

View File

@@ -196,6 +196,7 @@ function love.touchpressed(id,x,y)
end
x,y=ITP(xOy,x,y)
lastX,lastY=x,y
WIDGET.cursorMove(x,y)
if SCN.touchDown then SCN.touchDown(x,y)end
if kb.hasTextInput()then kb.setTextInput(false)end
end
@@ -204,10 +205,6 @@ function love.touchmoved(_,x,y,dx,dy)
x,y=ITP(xOy,x,y)
if SCN.touchMove then SCN.touchMove(x,y,dx/SCR.k,dy/SCR.k)end
WIDGET.drag(x,y,dx/SCR.k,dy/SCR.k)
if touching then
WIDGET.cursorMove(x,y)
if not WIDGET.sel then touching=false end
end
end
function love.touchreleased(id,x,y)
if SCN.swapping then return end