修复控件系统inputBox焦点问题

This commit is contained in:
MrZ626
2021-05-17 19:03:15 +08:00
parent ac0ff16537
commit 54daef0cd9

View File

@@ -1092,7 +1092,7 @@ end
function WIDGET.cursorMove(x,y) function WIDGET.cursorMove(x,y)
for _,W in next,WIDGET.active do for _,W in next,WIDGET.active do
if not W.hide and W.resCtr and W:isAbove(x,y)then if not W.hide and W.resCtr and W:isAbove(x,y)then
WIDGET.sel=W WIDGET.focus(W)
return return
end end
end end
@@ -1135,7 +1135,7 @@ function WIDGET.keyPressed(k)
if not W then if not W then
for _,w in next,WIDGET.active do for _,w in next,WIDGET.active do
if not w.hide and w.isAbove then if not w.hide and w.isAbove then
WIDGET.sel=w WIDGET.focus(w)
return return
end end
end end
@@ -1166,7 +1166,7 @@ function WIDGET.keyPressed(k)
end end
end end
if tar then if tar then
WIDGET.sel=tar WIDGET.focus(tar)
end end
else else
if W and W.type=='inputBox'then if W and W.type=='inputBox'then