Skip to content

Commit fb98ad6

Browse files
committed
再修正控件控制相关问题
1 parent 5a84fc1 commit fb98ad6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ local function _triggerMouseDown(x,y,k)
168168
if SCN.swapping then return end
169169
if SCN.mouseDown then SCN.mouseDown(x,y,k) end
170170
WIDGET.press(x,y,k)
171-
WIDGET.release(x,y,k)
172171
lastX,lastY=x,y
173172
if showClickFX then SYSFX.new('tap',3,x,y) end
174173
end
@@ -348,6 +347,7 @@ function love.keypressed(key,_,isRep)
348347
if not isRep then
349348
if showClickFX then SYSFX.new('tap',3,mx,my) end
350349
_triggerMouseDown(mx,my,1)
350+
WIDGET.release(mx,my,1)
351351
end
352352
end
353353
end
@@ -472,6 +472,7 @@ function love.gamepadpressed(_,key)
472472
mouseShow=true
473473
if showClickFX then SYSFX.new('tap',3,mx,my) end
474474
_triggerMouseDown(mx,my,1)
475+
WIDGET.release(mx,my,1)
475476
else
476477
if W and W.keypress then
477478
W:keypress(key)

0 commit comments

Comments
 (0)