-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeveloperSuiteInspector.lua
56 lines (51 loc) · 1.75 KB
/
DeveloperSuiteInspector.lua
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
-- Developer Suite
-- The MIT License © Arthur Corenzan
local NAMESPACE = "DeveloperSuite"
--
--
--
-- local outlinePool = ZO_ControlPool:New("DeveloperSuite_Outline")
-- outlinePool:SetCustomFactoryBehavior(function(outline)
-- local r, g, b = zo_random(), zo_random(), zo_random()
-- outline:GetNamedChild("Outline"):SetEdgeColor(r, g, b, 1)
-- outline:SetParent(GuiRoot)
-- end)
-- outlinePool:SetCustomResetBehavior(function(outline)
-- outline:SetParent(nil)
-- outline:ClearAnchors()
-- end)
-- local function applyOutline(control)
-- if not control then
-- return
-- end
-- local offsetX, offsetY = control:GetLeft(), control:GetTop()
-- local width, height = control:GetWidth(), control:GetHeight()
-- if offsetX and offsetY and width and height then
-- local outline = outlinePool:AcquireObject()
-- outline:SetAnchor(TOPLEFT, nil, nil, offsetX, offsetY)
-- outline:SetDimensions(width, height)
-- if control.GetNumChildren then
-- for i = 1, control:GetNumChildren() do
-- local child = control:GetChild(i)
-- applyOutline(child)
-- end
-- end
-- end
-- end
-- SLASH_COMMANDS["/outline"] = function()
-- outlinePool:ReleaseAllObjects()
-- local control = moc()
-- if control ~= GuiRoot then
-- applyOutline(control)
-- end
-- end
--
--
--
-- local function OnAddOnLoaded(savedVars)
-- DEVELOPER_SUITE_INSPECTOR = DeveloperSuite_Inspector:New(DeveloperSuite_InspectorTopLevelControl, savedVars.inspector)
-- SLASH_COMMANDS["/inspector"] = function()
-- DEVELOPER_SUITE_INSPECTOR:Toggle()
-- end
-- end
-- CALLBACK_MANAGER:RegisterCallback(NAMESPACE.."_OnAddOnLoaded", OnAddOnLoaded)