dark-ui-elements: add global helper function
This commit is contained in:
@@ -119,6 +119,9 @@ local function AddSpecialBackground(frame, w, h, x, y)
|
||||
end
|
||||
|
||||
local function DarkenFrame(frame, r, g, b, a)
|
||||
-- dont't do anything if disabled
|
||||
if not ShaguTweaks.DarkMode then return end
|
||||
|
||||
-- set defaults
|
||||
if not r and not g and not b then
|
||||
r, g, b, a = module.color.r, module.color.g, module.color.b, module.color.a
|
||||
@@ -167,6 +170,9 @@ local function DarkenFrame(frame, r, g, b, a)
|
||||
end
|
||||
end
|
||||
|
||||
-- register darken frame to global
|
||||
ShaguTweaks.DarkenFrame = DarkenFrame
|
||||
|
||||
module.enable = function(self)
|
||||
local name, original, r, g, b
|
||||
local hookBuffButton_Update = BuffButton_Update
|
||||
|
||||
Reference in New Issue
Block a user