From ee45f4aecf35a986cf34c6e770bacf69308d0e74 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 2 Sep 2020 17:18:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=AE=E7=9B=98=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=BB=91=E6=9D=A1=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/widget.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 32750e97..73530a45 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -1,6 +1,7 @@ local gc=love.graphics local kb=love.keyboard local int,abs=math.floor,math.abs +local max,min=math.max,math.min local format=string.format local color=color local setFont=setFont @@ -508,10 +509,14 @@ function WIDGET.keyPressed(i) if W then if W.type=="slider"then local p=W.disp() - local P=i=="left"and(p>0 and p-1)or p.18 then + W.lastTime=Timer() + W.change() + end end end end @@ -590,7 +595,10 @@ function WIDGET.gamepadPressed(i) local P=i=="left"and(p>0 and p-1)or p.18 then + W.lastTime=Timer() + W.change() + end end end elseif i=="dpup"or i=="dpdown"or i=="dpleft"or i=="dpright"then