整理代码

This commit is contained in:
MrZ626
2020-11-17 13:46:00 +08:00
parent 6a86c2d984
commit 24a47f1e1e
2 changed files with 2 additions and 4 deletions

View File

@@ -306,7 +306,7 @@ function love.gamepadpressed(_,i)
if gamepadDown[SCN.cur]then gamepadDown[SCN.cur](i)
elseif keyDown[SCN.cur]then keyDown[SCN.cur](keyMirror[i]or i)
elseif i=="back"then SCN.back()
else WIDGET.gamepadPressed(i)
else WIDGET.gamepadPressed(keyMirror[i]or i)
end
end
function love.gamepadreleased(_,i)

View File

@@ -228,7 +228,6 @@ end
function key:press()
self.code()
end
function WIDGET.newKey(D)--name,x,y,w[,h][,color][,font],code[,hide]
if not D.h then D.h=D.w end
local _={
@@ -317,7 +316,6 @@ function switch:press()
self.code()
SFX.play("move")
end
function WIDGET.newSwitch(D)--name,x,y[,font][,disp],code,hide
local _={
name= D.name,
@@ -453,7 +451,7 @@ function slider:drag(x)
self.change()
end
end
function slider:release(x,y)
function slider:release(x)
self.lastTime=0
self:drag(x)
end