Skip to content

Commit 3631324

Browse files
committed
Changed the default background color for the selected loadout to green
1 parent b255429 commit 3631324

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

core/Config.lua

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,38 @@ Config.sideBarColorOptionKeys = {
1919
};
2020

2121
function Config:Initialize()
22-
-- when adding options, remember to add them to types.lua (TLM_ConfigOptions) as well
22+
--- @class TLM_Config
23+
--- @enum (key) TLM_ConfigOptions
2324
self.defaultConfig = {
2425
autoApplyOnLevelUp = true,
2526
autoScale = true,
2627
autoPosition = true,
2728
autoApply = true,
2829
integrateWithSimc = true,
30+
characterVisibility = {},
31+
2932
sideBarBackgroundColor = { r = 0, g = 0, b = 0, a = 0.8 },
33+
3034
sideBarActiveElementTextColor = { r = 1, g = 1, b = 1, a = 1 },
31-
sideBarActiveElementBackgroundColor = { r = 0.2, g = 0.2, b = 0.2, a = 0.5 },
35+
sideBarActiveElementBackgroundColor = { r = 0.08, g = 0.5, b = 0.17, a = 0.5 },
3236
sideBarActiveElementHighlightBackgroundColor = { r = 0.5, g = 0.5, b = 0.5, a = 0.5 },
37+
3338
sideBarInactiveElementTextColor = { r = 1, g = 1, b = 1, a = 1 },
3439
sideBarInactiveElementBackgroundColor = { r = 0, g = 0, b = 0, a = 0.5 },
3540
sideBarInactiveElementHighlightBackgroundColor = { r = 0.5, g = 0.5, b = 0.5, a = 0.5 },
36-
characterVisibility = {},
3741
};
3842
for key, value in pairs(self.defaultConfig) do
3943
if TLM.db.config[key] == nil then
4044
TLM.db.config[key] = value;
4145
end
4246
end
47+
if not TLM.db.config._changedActiveElementBackgroundToGreen then
48+
local color = TLM.db.config.sideBarActiveElementBackgroundColor;
49+
if color.r == 0.2 and color.g == 0.2 and color.b == 0.2 and color.a == 0.5 then
50+
TLM.db.config.sideBarActiveElementBackgroundColor = self.defaultConfig.sideBarActiveElementBackgroundColor;
51+
end
52+
TLM.db.config._changedActiveElementBackgroundToGreen = true;
53+
end
4354

4455
Mixin(self, CallbackRegistryMixin);
4556
CallbackRegistryMixin.OnLoad(self);
@@ -50,6 +61,7 @@ end
5061

5162
function Config:GetOptions()
5263
local function GetColor(info)
64+
--- @type ColorRGBAData
5365
local color = self:GetConfig(info[#info]);
5466
return color.r, color.g, color.b, color.a;
5567
end

types.lua

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,6 @@
8080

8181
--- @class TLM_ElementFrame: Button
8282

83-
--- @alias TLM_ConfigOptions
84-
---|"autoApplyOnLevelUp"
85-
---|"autoScale"
86-
---|"autoPosition"
87-
---|"autoApply"
88-
---|"integrateWithSimc"
89-
---|"sideBarBackgroundColor"
90-
---|"sideBarActiveElementTextColor"
91-
---|"sideBarActiveElementBackgroundColor"
92-
---|"sideBarActiveElementHighlightBackgroundColor"
93-
---|"sideBarInactiveElementTextColor"
94-
---|"sideBarInactiveElementBackgroundColor"
95-
---|"sideBarInactiveElementHighlightBackgroundColor"
96-
9783
-------------------
9884
----- FrameXML ----
9985
-------------------

0 commit comments

Comments
 (0)