diff --git a/Zframework/wheelScroll.lua b/Zframework/wheelScroll.lua index a67c5560..3eece35a 100644 --- a/Zframework/wheelScroll.lua +++ b/Zframework/wheelScroll.lua @@ -1,5 +1,5 @@ local floatWheel=0 -return function(y) +return function(y,key1,key2) if y>0 then if floatWheel<0 then floatWheel=0 end floatWheel=floatWheel+y^1.2 @@ -8,11 +8,11 @@ return function(y) floatWheel=floatWheel-(-y)^1.2 end while floatWheel>=1 do - love.keypressed("up") + love.keypressed(key1 or"up") floatWheel=floatWheel-1 end while floatWheel<=-1 do - love.keypressed("down") + love.keypressed(key2 or"down") floatWheel=floatWheel+1 end end \ No newline at end of file