Skip to content

Commit

Permalink
rebirth add direct link to pack pages
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Dec 10, 2021
1 parent 1942df6 commit 30b547b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Themes/Rebirth/BGAnimations/playerInfoFrame/downloads.lua
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@ local function downloadsList()
self:zoom(nameTextSize)
self:maxwidth((actuals.MSDColumnLeftGap - actuals.NameColumnLeftGap - actuals.MSDWidth / 2) / nameTextSize - textZoomFudge)
registerActorToColorConfigElement(self, "main", "SecondaryText")
self.alphaDeterminingFunction = function(self)
if isOver(self) and pack ~= nil then self:diffusealpha(buttonHoverAlpha) else self:diffusealpha(1) end
end
end,
SetPackCommand = function(self)
if pack ~= nil then
Expand All @@ -442,6 +445,22 @@ local function downloadsList()
local expanded = i % 2 == 0 and " Expanded" or ""
self:settext(bundleTypes[index] .. expanded)
end
self:alphaDeterminingFunction()
end,
MouseDownCommand = function(self, params)
if self:IsInvisible() then return end
if pack ~= nil then
local urlstring = "https://etternaonline.com/pack/" .. pack:GetID()
GAMESTATE:ApplyGameCommand("urlnoexit," .. urlstring)
end
end,
MouseOverCommand = function(self)
if self:IsInvisible() then return end
self:alphaDeterminingFunction()
end,
MouseOutCommand = function(self)
if self:IsInvisible() then return end
self:alphaDeterminingFunction()
end,
},
LoadFont("Common Normal") .. {
Expand Down

0 comments on commit 30b547b

Please sign in to comment.