WoWInterface SVN zz_Actionbuttons

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/zz_Actionbuttons
    from Rev 10 to Rev 11
    Reverse comparison

Rev 10 → Rev 11

funcs.lua New file
0,0 → 1,43
local name, addon = ...
local db
local hooked = {}
local function dragAble()
return db['dragAble']
end
addon['addDrag'] = function(self)
if(InCombatLockdown()) then return end
if(not hooked[self]) then
local bname = self:GetName()
self:SetAlpha(1)
self:SetParent(UIParent)
self:SetWidth(1)
self:SetHeight(1)
self:SetPoint("CENTER")
self:SetFrameStrata("MEDIUM")
if(not _G[bname.."drag"]) then
db['bars'][bname] = db['bars'][bname] or {
['cols'] = 12,
['scale'] = 1,
}
self['db'] = db['bars'][bname]
self['dragAble'] = dragAble
self:SetScale(self['db']['scale'])
addon['AddDrag'](self,"FRAME",{
['width'] = 64,
['height'] = 64,
['anchor'] = "TOPLEFT",
['parentanchor'] = "TOPLEFT",
['xOffset'] = 16,
['yOffset'] = 16,
['offset'] = 16,
})
end
hooked[self] = true
else
self:SetScale(self['db']['scale'])
addon['LoadFrame'](self)
end
end
addon['preloads'][#addon['preloads'] + 1] = function()
db = addon['updateDB'](addon['db']['profile'])
end
\ No newline at end of file
miscbars.lua New file
0,0 → 1,44
local name, addon = ...
local db
local bagButtons = {
'CharacterBag3Slot',
'CharacterBag2Slot',
'CharacterBag1Slot',
'CharacterBag0Slot',
'MainMenuBarBackpackButton',
}
local buttons = {}
local function init() -- Bags
db = addon['updateDB'](addon['db']['profile'])
local f = CreateFrame("Frame", name.."BagBar", UIParent)
f['maxslots'] = 5
f['sbuttons'] = {}
addon['addDrag'](f)
for i = 1, #bagButtons do
local btn = _G[bagButtons[i]]
if(btn) then
f['sbuttons'][#f['sbuttons'] + 1] = btn
end
end
addon['applySettings'](name.."BagBar")
end
local function init2() -- MicroMenu
db = addon['updateDB'](addon['db']['profile'])
local f = _G[name.."MicroMenu"] or CreateFrame("Frame", name.."MicroMenu", UIParent)
f['maxslots'] = #MICRO_BUTTONS
f['sbuttons'] = {}
f['skipMasque'] = true
addon['addDrag'](f)
for _, bname in pairs(MICRO_BUTTONS) do
local btn = _G[bname]
if(btn) then
if(not InCombatLockdown()) then
UIPARENT_MANAGED_FRAME_POSITIONS[btn:GetName()] = nil
f['sbuttons'][#f['sbuttons'] + 1] = btn
end
end
end
addon['applySettings'](name.."MicroMenu",36)
end
addon['preloads'][#addon['preloads'] + 1] = init
addon['preloads'][#addon['preloads'] + 1] = init2
\ No newline at end of file
zz_Actionbuttons.toc
3,4 → 3,6
## X-WoWI-ID: 21069
## SavedVariables: zz_ActionbuttonsDB
Common\common.xml
funcs.lua
miscbars.lua
core.lua
\ No newline at end of file