Files
coa-weakauras/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpacer.lua
T
2025-01-06 19:47:37 +01:00

34 lines
865 B
Lua

--[[-----------------------------------------------------------------------------
Spacer Widget
Just uses up a bit of horizontal space
-------------------------------------------------------------------------------]]
if not WeakAuras.IsLibsOK() then return end
local Type, Version = "WeakAurasSpacer", 2
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local methods = {
["OnAcquire"] = function(self)
self:SetFullWidth(true)
self:SetHeight(4)
end,
}
local function Constructor()
local frame = CreateFrame("Frame", nil, UIParent)
frame:Hide()
local widget = {
frame = frame,
type = Type
}
for method, func in pairs(methods) do
widget[method] = func
end
return AceGUI:RegisterAsWidget(widget)
end
AceGUI:RegisterWidgetType(Type, Constructor, Version)