From ea54daf2554c00afbc5312d3c8327e8cac54d870 Mon Sep 17 00:00:00 2001 From: "born a rick, raised a morty, died a jerry" Date: Thu, 29 Nov 2018 02:12:35 -0500 Subject: [PATCH] refactor mousescroll a bit and fix multi use when songs are selected --- .../BGAnimations/_mousewheelscroll.lua | 44 ++++++++----------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/Themes/Til Death/BGAnimations/_mousewheelscroll.lua b/Themes/Til Death/BGAnimations/_mousewheelscroll.lua index 62691e6a98..272fd09cac 100644 --- a/Themes/Til Death/BGAnimations/_mousewheelscroll.lua +++ b/Themes/Til Death/BGAnimations/_mousewheelscroll.lua @@ -4,37 +4,31 @@ local pressingtab = false local top local function scrollInput(event) - if top:GetSelectionState() == 2 then - return + if top:GetName() == "ScreenSelectmusic" then + if top:GetSelectionState() == 2 then + return + end elseif event.DeviceInput.button == "DeviceButton_tab" then if event.type == "InputEventType_FirstPress" then pressingtab = true elseif event.type == "InputEventType_Release" then pressingtab = false end - elseif - event.DeviceInput.button == "DeviceButton_mousewheel up" and event.type == "InputEventType_FirstPress" and - top:GetSelectionState() ~= 2 - then - moving = true - if pressingtab == true then - whee:Move(-2) - elseif whee:IsSettled() then - whee:Move(-1) - else - whee:Move(-1) - end - elseif - event.DeviceInput.button == "DeviceButton_mousewheel down" and event.type == "InputEventType_FirstPress" and - top:GetSelectionState() ~= 2 - then - moving = true - if pressingtab == true then - whee:Move(2) - elseif whee:IsSettled() then - whee:Move(1) - else - whee:Move(1) + elseif event.type == "InputEventType_FirstPress" then + if event.DeviceInput.button == "DeviceButton_mousewheel up" then + moving = true + if pressingtab == true and not whee:IsSettled() then + whee:Move(2) + else + whee:Move(1) + end + elseif event.DeviceInput.button == "DeviceButton_mousewheel down" then + moving = true + if pressingtab == true and not whee:IsSettled() then + whee:Move(2) + else + whee:Move(1) + end end elseif moving == true then whee:Move(0)