From 6413111615d43e736ff5b7e24d9a455049bcd8b8 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 24 Jan 2021 14:20:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=AF=E4=BB=A5=E7=94=A8?= =?UTF-8?q?=E6=96=B9=E5=90=91=E9=94=AE=E9=80=89=E6=8B=A9=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E8=A7=81=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/widget.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 9644bb5a..e847d356 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -1019,7 +1019,7 @@ function WIDGET.press(x,y) elseif W.type=="slider"then WIDGET.drag(x,y) end - if W.hide and W.hide()then WIDGET.sel=false end + if W.hide==true or W.hide and W.hide()then WIDGET.sel=false end end function WIDGET.drag(x,y,dx,dy) local W=WIDGET.sel @@ -1049,7 +1049,7 @@ function WIDGET.keyPressed(k) 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 v.isAbove then + if not(W.hide==true or W.hide and W.hide())and v.isAbove then WIDGET.sel=v return end @@ -1065,7 +1065,7 @@ function WIDGET.keyPressed(k) local swap_xy=k=="up"or k=="down" if swap_xy then WX,WY=WY,WX end -- note that we do not swap them back later for _,W1 in ipairs(WIDGET.active)do - if W~=W1 and W1.resCtr then + if W~=W1 and W1.resCtr and not(W.hide==true or W.hide and W.hide())then local L=W1.resCtr for j=1,#L,2 do local x,y=L[j],L[j+1]