Skip to content

Commit

Permalink
hooverphonic
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 29, 2018
1 parent da66a81 commit a231159
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Themes/Til Death/BGAnimations/_mousewheelscroll.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ local function scrollInput(event)
local mouseX = INPUTFILTER:GetMouseX()
local mouseY = INPUTFILTER:GetMouseY()

if mouseX > capWideScale(370, 500) and mouseX < SCREEN_WIDTH then
if mouseX > capWideScale(370, 500) and mouseX < SCREEN_WIDTH - 32 then
if event.DeviceInput.button == "DeviceButton_left mouse button" and event.type == "InputEventType_FirstPress" then
local n = 0
local m = 1
Expand Down
18 changes: 14 additions & 4 deletions Themes/_fallback/Graphics/ScrollBar TickThumb.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
local t = Def.ActorFrame {}

local whee
t[#t + 1] =
Def.ActorFrame {
Def.Quad {
InitCommand = function(self)
self:zoomto(32, 32)
Name = "DootyMcBooty",
OnCommand = function(self)
self:zoomto(32, 32):valign(0.634522134234)
whee = SCREENMAN:GetTopScreen():GetMusicWheel()
end,
LeftClickMessageCommand = function(self)
if SCREEN_WIDTH - INPUTFILTER:GetMouseX() < 32 then
local idx = whee:GetCurrentIndex()
local num = whee:GetNumItems()
local dum = (INPUTFILTER:GetMouseY() - 45) / (SCREEN_HEIGHT - 103)
whee:Move(notShit.round(num * dum) - idx)
end
end
}
}

return t
return t
2 changes: 2 additions & 0 deletions src/WheelBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ WheelBase::RebuildWheelItems(int iDist)
}

for (int i = iFirst; i <= iLast; i++) {
if (i > items.size())
break;
int iIndex = iFirstVisibleIndex + i;
wrap(iIndex, data.size());

Expand Down

0 comments on commit a231159

Please sign in to comment.