diff --git a/Zframework/init.lua b/Zframework/init.lua index ac2ba287..943f02a3 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -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) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 3ebbcf8a..01b11f68 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -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