From 291b258333d4b19b7f07e82849b0dac7ed1edd68 Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 19 Mar 2025 17:11:08 +0100 Subject: [PATCH] dark-ui-elements: add global helper function --- mods/dark-ui-elements.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/dark-ui-elements.lua b/mods/dark-ui-elements.lua index 0847b2b..1236c2c 100644 --- a/mods/dark-ui-elements.lua +++ b/mods/dark-ui-elements.lua @@ -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