Skip to content

Commit

Permalink
refactor mousescroll a bit and fix multi use when songs are selected
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 29, 2018
1 parent 5d880bc commit ea54daf
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions Themes/Til Death/BGAnimations/_mousewheelscroll.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ea54daf

Please sign in to comment.