WoWInterface SVN zz_Actionbuttons

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 16 to Rev 17
    Reverse comparison

Rev 16 → Rev 17

trunk/zz_Actionbuttons/core.lua
21,6 → 21,7
BonusActionBarFrameTexture2,
BonusActionBarFrameTexture3,
BonusActionBarFrameTexture4,
-- PossessBarFrame,
VehicleMenuBar,
}
for i = 1, #hide do
79,7 → 80,6
btn:SetParent(f)
btn:ClearAllPoints()
if(y == 1) then
 
btn:SetPoint("TOPLEFT", f, "TOPLEFT",xoffset , -row * bh - yoffset)
else
btn:SetPoint("TOPLEFT", lastbutton, "TOPRIGHT",xoffset,0)
94,6 → 94,7
y = 1
row = row + 1
end
 
end
end
if(row < 1) then row = 1 end
102,41 → 103,43
bh = bh or 0
f:SetWidth(db['bars'][bname]['cols']*(lastbutton:GetWidth() + xoffset) + xoffset)
f:SetHeight(row * (bh + yoffset) + yoffset)
if(not f['skipMasque'] and addon['MSQ'] and addon['MSQGroup']) then
addon['MSQGroup']:ReSkin() -- test if bags keep their skin or if I need to create new bag buttons
end
end
addon['applySettings'] = applySettings
local function getButton(parent, id, offset)
local btn
if(offset <= 12) then
if(offset <= NUM_ACTIONBAR_BUTTONS) then
btn = _G['ActionButton'..id]
elseif(offset <= 24) then
elseif(offset <= NUM_ACTIONBAR_BUTTONS * 2) then
 
elseif(offset <= 36) then
elseif(offset <= NUM_ACTIONBAR_BUTTONS * 3) then
btn = _G['MultiBarRightButton'..id]
elseif(offset <= 48) then
elseif(offset <= NUM_ACTIONBAR_BUTTONS * 4) then
btn = _G['MultiBarLeftButton'..id]
elseif(offset <= 60) then
elseif(offset <= NUM_ACTIONBAR_BUTTONS * 5) then
btn = _G['MultiBarBottomRightButton'..id]
elseif(offset <= 72) then
elseif(offset <= NUM_ACTIONBAR_BUTTONS * 6) then
btn = _G['MultiBarBottomLeftButton'..id]
elseif((offset > 190) and (offset <= 200)) then
elseif((offset > 190) and (offset <= 190 + NUM_SHAPESHIFT_SLOTS)) then
btn = _G['ShapeshiftButton'..id]
elseif((offset > 200) and (offset <= 210)) then
elseif((offset > 190 + NUM_SHAPESHIFT_SLOTS) and (offset <= 190 + NUM_SHAPESHIFT_SLOTS + NUM_PET_ACTION_SLOTS)) then
btn = _G['PetActionButton'..id]
elseif((offset > 190 + NUM_SHAPESHIFT_SLOTS + NUM_PET_ACTION_SLOTS) and (offset <= 190 + NUM_SHAPESHIFT_SLOTS + NUM_PET_ACTION_SLOTS + NUM_POSSESS_SLOTS)) then
btn = _G['PossessButton'..id]
end
 
if(not btn) then
btn = CreateFrame("CheckButton", "$PARENTActionButton"..offset, parent, "ActionButtonTemplate ActionBarButtonCodeTemplate",id)
btn['buttonType'] = "ZZACTIONBUTTON"
else
-- btn:GetParent():UnregisterAllEvents()
btn:GetParent():Hide()
btn:GetParent().Show = btn:GetParent().Hide
btn:ClearAllPoints()
btn:SetParent(parent)
end
fadeInOut(btn)
 
-- print(parent, id, offset, btn:GetName())
return btn
end
 
202,11 → 205,10
elseif(class == "ROGUE") then
RegisterStateDriver(f, "page", "[stance:1] 7;[stance:3] 8; 1") -- 1 stealth/ 3 shadow dance
elseif(class == "PRIEST") then
RegisterStateDriver(f, "page", "[stance:1] 7; 1")
RegisterStateDriver(f, "page", "[stance:1,@player,nodead] 7; 1")
end
RegisterStateDriver(f, "possess", "[bonusbar:5] 11")
else
 
f:SetAttribute('_onstate-showvehicle', [[
if(newstate=='hide') then
self:Hide()
240,15 → 242,10
self:SetAttribute('action--dummy', self:GetAttribute('action--dummy'))
]])
elseif(bid<7) then
b:SetAttribute('_childupdate-actionpage', [[
 
]])
-- b:SetAttribute('_childupdate-actionpage', [[]])
end
f['sbuttons'][#f['sbuttons'] + 1] = b
-- b:SetAttribute('action', i)
end
-- addon['addDrag'](f)
-- f['sizeButton'] = lastbutton:GetHeight()
addon['applySettings'](f:GetName(),32)
if(db['bars'][f:GetName()]['fadein']) then fadeOut(lastbutton) end
return f:GetName()
269,6 → 266,7
 
local function init(self, event, ...)
_,class = UnitClass('player')
addon['applySettings']("zzABar20",32)
end
addon['updateDB'] = function(db)
db['bars'] = db['bars'] or {}
287,6 → 285,7
db['bars']['MultiCastActionBarFrame']['cols'] = db['bars']['MultiCastActionBarFrame']['cols'] or 12
addon['AddConfigEntry'](addon, name, 'toggle', 'dragAble', 'Unlocked', 'Use alt+click to move your bars', 0)
do
-- ShapeshiftButton1:SetSize(32,32)
local function addP(bname)
local o = addon['AddConfigMenu'](addon, {
['name'] = bname,
303,30 → 302,27
end
addP(createBar(20, NUM_SHAPESHIFT_SLOTS,32))
addP(createBar(21, NUM_PET_ACTION_SLOTS,32))
 
-- addP(createBar(22, NUM_POSSESS_SLOTS,32))
addP("MultiCastActionBarFrame")
addP(name.."MicroMenu")
addP(name.."BagBar")
end
 
MultiCastActionBarFrame:ClearAllPoints()
MultiCastActionBarFrame:SetPoint("CENTER")
UIPARENT_MANAGED_FRAME_POSITIONS["MultiCastActionBarFrame"] = nil
addon['addDrag'](MultiCastActionBarFrame)
MoveMicroButtons = function() end
VehicleMenuBar_MoveMicroButtons = function() end
-- hooksecurefunc("ChangeMultiCastActionPage", updateMCB)
hooksecurefunc("MultiActionBar_UpdateGridVisibility", function()
local bar = _G['zzABar2']
for i = 1, #bar['sbuttons'] do
local b = bar['sbuttons'][i]
if (ALWAYS_SHOW_MULTIBARS == "1" or ALWAYS_SHOW_MULTIBARS == 1 ) then
b:SetAttribute('showgrid',1)
-- print("show", b:GetName(),b:GetAttribute("showgrid"))
ActionButton_ShowGrid(b)
-- print("show", b:GetName(),b:GetAttribute("showgrid"))
else
b:SetAttribute('showgrid',0)
-- print("hide", b:GetName())
ActionButton_HideGrid(b)
end
end
340,6 → 336,15
exitButton:SetScript("OnClick", function(self) VehicleExit() end)
addon['addSimpleDrag'](exitButton,"FRAME")
RegisterStateDriver(exitButton, "visibility", "[vehicleui] show;hide")
-- ExtraAction
ExtraActionBarFrame:SetParent(UIParent)
ExtraActionBarFrame:SetSize(64,64)
ExtraActionBarFrame:SetPoint("CENTER",0,0)
UIPARENT_MANAGED_FRAME_POSITIONS["ExtraActionBarFrame"] = nil
addon['addSimpleDrag'](ExtraActionBarFrame,"FRAME")
if(addon['MSQGroup']) then
addon['MSQGroup']:AddButton(_G["ExtraActionButton1"])
end
end
 
addon['startup'](addon, name, name, init, true, defaults)
\ No newline at end of file