Skip to content

Commit

Permalink
Add cancel one dl button
Browse files Browse the repository at this point in the history
  • Loading branch information
nico-abram committed Oct 11, 2018
1 parent 928a80d commit 7f0bb43
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions Themes/Til Death/BGAnimations/ScreenPackDownloader underlay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,68 @@ local o =
InitCommand = function(self)
self:xy(SCREEN_WIDTH / 6 + 10, 56):zoom(0.4):halign(0.5):maxwidth(SCREEN_WIDTH / 2):settext("Bundle Select")
end
},
--[[
Def.Quad {
InitCommand = function(self)
self:xy(SCREEN_WIDTH / 12 + 5, 40 + packh):zoomto(SCREEN_WIDTH / 6 - 10, packh - 2):valign(0):diffuse(
color("#ffffff")
):diffusealpha(0.4)
end,
MouseLeftClickMessageCommand = function(self)
if isOver(self) then
local dls = DLMAN:GetDownloads()
for i, dl in ipairs(dls) do
dl:Stop()
end
end
end,
HighlightCommand = function(self)
if isOver(self) then
self:diffusealpha(0.8)
else
self:diffusealpha(0.4)
end
end
},
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(SCREEN_WIDTH / 12 + 10, 56 + packh):zoom(0.4):halign(0.5):maxwidth(SCREEN_WIDTH / 3):settext(
"Cancel all dls"
)
end
},
--]]
Def.Quad {
InitCommand = function(self)
self:xy(SCREEN_WIDTH / 4 + 15, 40 + packh):zoomto(SCREEN_WIDTH / 6 - 10, packh - 2):valign(0):diffuse(
color("#ffffff")
):diffusealpha(0.4)
end,
MouseLeftClickMessageCommand = function(self)
if isOver(self) then
local dl = DLMAN:GetDownloads()[1]
if dl then
dl:Stop()
end
end
end,
HighlightCommand = function(self)
if isOver(self) then
self:diffusealpha(0.8)
else
self:diffusealpha(0.4)
end
end
},
LoadFont("Common Large") ..
{
InitCommand = function(self)
self:xy(SCREEN_WIDTH / 4 + 15, 56 + packh):zoom(0.4):halign(0.5):maxwidth(SCREEN_WIDTH / 3):settext(
"Cancel current dl"
)
end
}
}

Expand Down

0 comments on commit 7f0bb43

Please sign in to comment.