修复之前控件系统升级手滑导致方向键选择按钮会报错

This commit is contained in:
MrZ626
2021-01-25 23:27:47 +08:00
parent 3446220895
commit bfac711663

View File

@@ -1048,9 +1048,9 @@ function WIDGET.keyPressed(k)
end
elseif k=="up"or k=="down"or k=="left"or k=="right"then
if not WIDGET.sel then
for _,v in next,WIDGET.active do
if not(W.hide==true or W.hide and W.hide())and v.isAbove then
WIDGET.sel=v
for _,W in next,WIDGET.active do
if not(W.hide==true or W.hide and W.hide())and W.isAbove then
WIDGET.sel=W
return
end
end