整理代码
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user