Skip to content

Commit

Permalink
make generichighlight slightly more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 28, 2018
1 parent 01e7bd1 commit f12eb31
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions Themes/Til Death/BGAnimations/ScreenSelectProfile overlay.lua
Expand Up @@ -5,18 +5,23 @@ local function selectprofile(self)
end
end
local function genericHighlight(self, highlight, base, clickaction)
local highlight = highlight or 0.6
local base = base or 1
self:SetUpdateFunction(function(self)
self:RunCommandsOnChildren(
function(self)
if isOver(self) then
self:diffusealpha(highlight)
else
self:diffusealpha(base)
if self:IsVisible() then
self:RunCommandsOnChildren(
function(self)
if isOver(self) then
self:diffusealpha(highlight)
else
self:diffusealpha(base)
end
end
)
end
)
end)
self:SetUpdateRate(0.5)
end
)
self:SetUpdateFunctionInterval(0.025)
if clickaction then
self:RunCommandsOnChildren(
function(self)
Expand Down

0 comments on commit f12eb31

Please sign in to comment.