修改SYSFX.newShade用法

This commit is contained in:
MrZ626
2020-12-09 12:03:04 +08:00
parent 2f359025f2
commit 876461e8d2
8 changed files with 15 additions and 15 deletions

View File

@@ -143,14 +143,14 @@ function SYSFX.newRectRipple(rate,x,y,w,h)
x=x,y=y,w=w,h=h,
}
end
function SYSFX.newShade(rate,r,g,b,x,y,w,h)
function SYSFX.newShade(rate,x,y,w,h,r,g,b)
fx[#fx+1]={
update=FXupdate.shade,
draw=FXdraw.shade,
t=0,
rate=rate,
r=r,g=g,b=b,
x=x,y=y,w=w,h=h,
r=r or 1,g=g or 1,b=b or 1,
}
end
function SYSFX.newCell(rate,image,size,x,y,vx,vy,ax,ay)

View File

@@ -620,12 +620,12 @@ function selector:press(x)
if x<self.x+self.w*.5 then
if s>1 then
s=s-1
SYSFX.newShade(3,1,1,1,self.x,self.y,self.w*.5,60)
SYSFX.newShade(3,self.x,self.y,self.w*.5,60)
end
else
if s<#self.list then
s=s+1
SYSFX.newShade(3,1,1,1,self.x+self.w*.5,self.y,self.w*.5,60)
SYSFX.newShade(3,self.x+self.w*.5,self.y,self.w*.5,60)
end
end
if self.select~=s then
@@ -641,10 +641,10 @@ function selector:arrowKey(isLeft)
if isLeft and s==1 or not isLeft and s==#self.list then return end
if isLeft then
s=s-1
SYSFX.newShade(3,1,1,1,self.x,self.y,self.w*.5,60)
SYSFX.newShade(3,self.x,self.y,self.w*.5,60)
else
s=s+1
SYSFX.newShade(3,1,1,1,self.x+self.w*.5,self.y,self.w*.5,60)
SYSFX.newShade(3,self.x+self.w*.5,self.y,self.w*.5,60)
end
self.code(self.list[s])
self.select=s