1 --[[-----------------------------------------------------------------------------
3 -------------------------------------------------------------------------------]]
4 local Type, Version = "Heading", 20
5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
6 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
12 local CreateFrame, UIParent = CreateFrame, UIParent
14 --[[-----------------------------------------------------------------------------
16 -------------------------------------------------------------------------------]]
18 ["OnAcquire"] = function(self)
24 -- ["OnRelease"] = nil,
26 ["SetText"] = function(self, text)
27 self.label:SetText(text or "")
28 if text and text ~= "" then
29 self.left:SetPoint("RIGHT", self.label, "LEFT", -5, 0)
32 self.left:SetPoint("RIGHT", -3, 0)
38 --[[-----------------------------------------------------------------------------
40 -------------------------------------------------------------------------------]]
41 local function Constructor()
42 local frame = CreateFrame("Frame", nil, UIParent)
45 local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
47 label:SetPoint("BOTTOM")
48 label:SetJustifyH("CENTER")
50 local left = frame:CreateTexture(nil, "BACKGROUND")
52 left:SetPoint("LEFT", 3, 0)
53 left:SetPoint("RIGHT", label, "LEFT", -5, 0)
54 left:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
55 left:SetTexCoord(0.81, 0.94, 0.5, 1)
57 local right = frame:CreateTexture(nil, "BACKGROUND")
59 right:SetPoint("RIGHT", -3, 0)
60 right:SetPoint("LEFT", label, "RIGHT", 5, 0)
61 right:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
62 right:SetTexCoord(0.81, 0.94, 0.5, 1)
71 for method, func in pairs(methods) do
75 return AceGUI:RegisterAsWidget(widget)
78 AceGUI:RegisterWidgetType(Type, Constructor, Version)