-- Core.lua
idActionBar = {}
idActionBar.bars = {}
function idActionBar:Enable()
... snip ...
-- enable the bars
for bar in self.bars do
bar:Enable()
end
end
function idActionBar:add(bar)
if not self.bars[bar] then
self.bars[bar] = bar
end
end
idActionBar:Enable()
-- Pagedbar.lua
local Pagedbar = {}
function Pagedbar:Enable()
self.wrap = CreateFrame('frame', nil, UIParent)
idActionBar:newBar(self.wrap, 'idActionButton', 1, 1, 12, 0)
self.wrap:ClearAllPoints()
self.wrap:SetPoint('BOTTOM', UIParent, 'BOTTOM')
MainMenuBar:Hide()
self.wrap:Show()
end
idActionBar:add(Pagedbar)
-- Petbar.lua
local Petbar = {}
function Petbar:Enable()
if not({Warlock=1, Hunter=1, Priest=1})[UnitClass('player')] then return end
self.wrap = CreateFrame('frame', nil, UIParent)
idActionBar:newBar(self.wrap, 'PetActionButton', 1, 1, 10, 0)
self.wrap:ClearAllPoints()
if self.showmain then
self.wrap:SetPoint('BOTTOMLEFT', self.wrap, 'TOPLEFT', 0, 0)
else
self.wrap:SetPoint('BOTTOM', UIParent, 'BOTTOM')
end
self.wrap:Show()
end
idActionBar:add(Petbar)