-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtekKonfigGroup.lua
More file actions
31 lines (25 loc) · 860 Bytes
/
tekKonfigGroup.lua
File metadata and controls
31 lines (25 loc) · 860 Bytes
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
local lib, oldminor = LibStub:NewLibrary("tekKonfig-Group", 2)
if not lib then return end
lib.bg = {
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 16,
insets = { left = 5, right = 5, top = 5, bottom = 5 }
}
-- Creates a background box to place behind widgets for visual grouping.
-- All args optional, parent highly recommended
function lib.new(parent, label, ...)
local box = CreateFrame('Frame', nil, parent)
box:SetBackdrop(lib.bg)
box:SetBackdropBorderColor(0.4, 0.4, 0.4)
box:SetBackdropColor(0.1, 0.1, 0.1)
if select('#',...) > 0 then box:SetPoint(...) end
if label then
local fs = box:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
fs:SetPoint("BOTTOMLEFT", box, "TOPLEFT", 16, 0)
fs:SetText(label)
end
return box
end