修复选中selector按空格报错

This commit is contained in:
MrZ626
2020-09-22 22:58:31 +08:00
parent 868abe1396
commit db36423f48

View File

@@ -591,6 +591,7 @@ function WIDGET.press(x,y)
elseif W.type=="slider"then elseif W.type=="slider"then
WIDGET.drag(x,y) WIDGET.drag(x,y)
elseif W.type=="selector"then elseif W.type=="selector"then
if x then
local s=W.select local s=W.select
if x<W.x+W.w*.5 then if x<W.x+W.w*.5 then
if s>1 then if s>1 then
@@ -610,6 +611,7 @@ function WIDGET.press(x,y)
SFX.play("prerotate") SFX.play("prerotate")
end end
end end
end
if W.hide and W.hide()then WIDGET.sel=nil end if W.hide and W.hide()then WIDGET.sel=nil end
end end
function WIDGET.drag(x,y,dx,dy) function WIDGET.drag(x,y,dx,dy)