控件模块/场景代码更好地响应系统长按

This commit is contained in:
MrZ626
2021-06-17 22:17:35 +08:00
parent 37a3e36bd5
commit e5a3b6c6ac
35 changed files with 143 additions and 165 deletions

View File

@@ -1150,9 +1150,9 @@ function WIDGET.release(x,y)
W:release(x,y+WIDGET.scrollPos)
end
end
function WIDGET.keyPressed(k)
function WIDGET.keyPressed(k,isRep)
local W=WIDGET.sel
if k=="space"or k=="return"then
if not isRep and(k=="space"or k=="return")then
WIDGET.press()
elseif kb.isDown("lshift","lalt","lctrl")and(k=="left"or k=="right")then
--When hold [↑], control slider with left/right