From c76ac95a286da24d753d78233d2be3fd5e4bc524 Mon Sep 17 00:00:00 2001 From: IgorTimofeev Date: Sun, 31 Dec 2023 11:23:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D1=83,=20=D1=81=D0=BA=D1=80=D0=BE=D0=BB?= =?UTF-8?q?=D0=BB=20=D0=B2=D1=81=D1=8F=D0=BA=D0=BE=20=D0=BB=D0=B8=D1=88?= =?UTF-8?q?=D0=BD=D0=B8=D0=BC=20=D0=BD=D0=B5=20=D0=B1=D1=83=D0=B4=D0=B5?= =?UTF-8?q?=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Applications/Pioneer.app/Main.lua | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Applications/Pioneer.app/Main.lua b/Applications/Pioneer.app/Main.lua index b90a9aab..52785a03 100644 --- a/Applications/Pioneer.app/Main.lua +++ b/Applications/Pioneer.app/Main.lua @@ -778,11 +778,19 @@ end local jog = window:addChild(GUI.object(15, 20, 52, 26)) local jogAngleOld -jog.eventHandler = function(workspace, jog, e1, e2, e3, e4, ...) +jog.eventHandler = function(workspace, jog, e1, e2, e3, e4, e5, ...) if not tape or not powerButton.pressed then return end + local function jogNavigate(direction) + incrementJogIndex(direction) + invalidateJogIncrementUptime(computer.uptime()) + workspace:draw() + + navigate(direction) + end + if e1 == "drag" then local angleNew = math.atan2( e3 - jog.x - jog.width / 2, @@ -790,19 +798,16 @@ jog.eventHandler = function(workspace, jog, e1, e2, e3, e4, ...) ) if jogAngleOld then - local direction = jogAngleOld - angleNew >= 0 and 1 or -1 - - incrementJogIndex(direction) - invalidateJogIncrementUptime(computer.uptime()) - navigate(direction) - - workspace:draw() + jogNavigate(jogAngleOld - angleNew >= 0 and 1 or -1) end jogAngleOld = angleNew elseif e1 == "drop" then jogAngleOld = nil + + elseif e1 == "scroll" then + jogNavigate(e5 >= 0 and 1 or -1) end end @@ -1179,7 +1184,7 @@ cueButton.eventHandler = function(workspace, cueButton, e1) if e1 == "touch" then cueButton.touchUptime = computer.uptime() + 10 - + if playButton.blinking then tapeConfig.cue = invoke("getPosition") cueButton.blinking = false