修复选中selector按空格报错
This commit is contained in:
@@ -591,24 +591,26 @@ 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
|
||||||
local s=W.select
|
if x then
|
||||||
if x<W.x+W.w*.5 then
|
local s=W.select
|
||||||
if s>1 then
|
if x<W.x+W.w*.5 then
|
||||||
s=s-1
|
if s>1 then
|
||||||
sysFX.newShade(.3,1,1,1,W.x,W.y,W.w*.5,60)
|
s=s-1
|
||||||
|
sysFX.newShade(.3,1,1,1,W.x,W.y,W.w*.5,60)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if s<#W.list then
|
||||||
|
s=s+1
|
||||||
|
sysFX.newShade(.3,1,1,1,W.x+W.w*.5,W.y,W.w*.5,60)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
if W.select~=s then
|
||||||
if s<#W.list then
|
W.code(W.list[s])
|
||||||
s=s+1
|
W.select=s
|
||||||
sysFX.newShade(.3,1,1,1,W.x+W.w*.5,W.y,W.w*.5,60)
|
W.selText=W.list[s]
|
||||||
|
SFX.play("prerotate")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if W.select~=s then
|
|
||||||
W.code(W.list[s])
|
|
||||||
W.select=s
|
|
||||||
W.selText=W.list[s]
|
|
||||||
SFX.play("prerotate")
|
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user