From 24a47f1e1ec01d9f9d22f4f7f3394095ac116d1b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 17 Nov 2020 13:46:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 2 +- Zframework/widget.lua | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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