dark-ui-elements: add global helper function

This commit is contained in:
shagu
2025-03-19 17:11:08 +01:00
parent cbee354a9a
commit 291b258333
+6
View File
@@ -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