-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathapi.lua
More file actions
76 lines (59 loc) · 1.95 KB
/
api.lua
File metadata and controls
76 lines (59 loc) · 1.95 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
local SCM = select(2, ...)
SCMAPI = {}
function SCMAPI.AddTab(tab)
SCM:AddTab(tab)
end
function SCMAPI.RegisterClassConfig(classFileName, config)
if classFileName and config then
SCM.DB:RegisterClassConfig(classFileName, config)
end
end
function SCMAPI.ImportProfile(profileName, importString)
SCM:ImportProfile(profileName, importString)
end
function SCMAPI.ImportGlobalSettings(importString)
SCM:ImportGlobalSettings(importString)
end
function SCMAPI.ImportGlobalAnchors(importString)
SCM:ImportGlobalAnchors(importString)
end
function SCMAPI.AddCustomIcon(anchorGroup, iconType, configID, order, uniqueID, isGlobal)
local uniqueID = SCM:AddCustomIcon(anchorGroup, iconType, configID, order, uniqueID, isGlobal)
if not uniqueID then
return
end
SCM:ApplyAnchorGroupCDManagerConfig(anchorGroup, isGlobal)
return uniqueID, SCM:GetConfigTableByID(uniqueID, iconType, isGlobal)
end
function SCMAPI.RegisterAndLoadConfig(profileName, classFileName, config, specID)
SCM.DB:RegisterAndLoadConfig(profileName, classFileName, config, specID)
end
function SCMAPI.RegisterCustomSkin(skinFunction)
tinsert(SCM.Skins, skinFunction)
end
function SCMAPI.ReloadSkins()
SCM:ApplyAllCDManagerConfigs()
end
function SCMAPI.RegisterCustomAnchor(frame, options, override)
if frame and (not SCM.CustomAnchors[frame] or override) then
SCM.CustomAnchors[frame] = options
end
end
function SCMAPI.RegisterCustomEntry(customEntry)
tinsert(SCM.CustomEntries, customEntry)
end
function SCMAPI.SetPrimaryResourceBarColorOverride(r, g, b)
return SCM:SetPrimaryResourceBarColorOverride(r, g, b)
end
function SCMAPI.ClearPrimaryResourceBarColorOverride()
return SCM:ClearPrimaryResourceBarColorOverride()
end
function SCMAPI.SetPrimaryResourceBarTextOverride(text)
return SCM:SetPrimaryResourceBarTextOverride(text)
end
function SCMAPI.ClearPrimaryResourceBarTextOverride()
return SCM:ClearPrimaryResourceBarTextOverride()
end
function SCMAPI.FetchAnchors()
return SCM.anchorFrames
end