-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.lua
More file actions
87 lines (83 loc) · 1.77 KB
/
Main.lua
File metadata and controls
87 lines (83 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
local function ConvertTags(tags)
local res = {}
for _, tag in ipairs(tags) do
res[tag] = true
end
return res
end
local skinners = {
ItemButton = function(frame)
end,
IconButton = function(button, tags)
if tags.sort then
-- do something
elseif tags.bank then
-- do something
elseif tags.guildBank then
-- do something
elseif tags.allCharacters then
-- do something
elseif tags.customise then
-- do something
elseif tags.bagSlots then
-- do something
else
-- generic
end
end,
Button = function(frame)
end,
ButtonFrame = function(frame, tags)
if tags.backpack then
-- do something
elseif tags.bank then
-- do something
elseif tags.guild then
-- do something
else
-- generic
end
end,
SearchBox = function(frame)
end,
EditBox = function(frame)
end,
TabButton = function(frame)
end,
TopTabButton = function(frame)
end,
SideTabButton = function(frame)
end,
TrimScrollBar = function(frame)
end,
CheckBox = function(frame)
end,
Slider = function(frame)
end,
InsetFrame = function(frame)
end,
Divider = function(tex)
end,
CategoryLabel = function(btn)
end,
CategorySectionHeader = function(btn)
end,
CornerWidget = function(frame, tags)
-- Example widget
if frame:IsObjectType("FontString") then
-- modify the scale/font size
end
end,
DropDownWithPopout = function(button)
end,
}
local function SkinFrame(details)
local func = skinners[details.regionType]
if func then
func(details.region, details.tags and ConvertTags(details.tags) or {})
end
end
Baganator.API.Skins.RegisterListener(SkinFrame)
for _, details in ipairs(Baganator.API.Skins.GetAllFrames()) do
SkinFrame(details)
end