Quantcast
WoWInterface: SVN - zz_Actionbuttons - Path Comparison - / Rev 13 and / Rev 14

WoWInterface SVN zz_Actionbuttons

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 13 to Rev 14
    Reverse comparison

Rev 13 → Rev 14

trunk/zz_Actionbuttons/funcs.lua
4,6 → 4,14
local function dragAble()
return db['dragAble']
end
addon['addSimpleDrag'] = function(self)
local bname = self:GetName()
db[bname] = db[bname] or {}
self['db'] = db[bname]
self['dragAble'] = dragAble
addon['AddDrag'](self,"FRAME")
end
 
addon['addDrag'] = function(self)
if(InCombatLockdown()) then return end
if(not hooked[self]) then
trunk/zz_Actionbuttons/miscbars.lua
18,9 → 18,11
local btn = _G[bagButtons[i]]
if(btn) then
f['sbuttons'][#f['sbuttons'] + 1] = btn
addon['fadeInOut'](btn)
end
end
addon['applySettings'](name.."BagBar")
addon['fadeInOutHeader'](f)
end
local function init2() -- MicroMenu
db = addon['updateDB'](addon['db']['profile'])
35,10 → 37,12
if(not InCombatLockdown()) then
UIPARENT_MANAGED_FRAME_POSITIONS[btn:GetName()] = nil
f['sbuttons'][#f['sbuttons'] + 1] = btn
addon['fadeInOut'](btn)
end
end
end
addon['applySettings'](name.."MicroMenu",36)
addon['fadeInOutHeader'](f)
end
addon['preloads'][#addon['preloads'] + 1] = init
addon['preloads'][#addon['preloads'] + 1] = init2
\ No newline at end of file
trunk/zz_Actionbuttons/core.lua
19,6 → 19,7
BonusActionBarFrameTexture2,
BonusActionBarFrameTexture3,
BonusActionBarFrameTexture4,
VehicleMenuBar,
}
for i = 1, #hide do
local f = hide[i]
28,14 → 29,45
end
end
 
local function fadeIn(self)
self:GetParent():SetAlpha(1)
end
 
local function fadeOut(self)
local bname = self:GetParent():GetName()
if(IsAltKeyDown() or not bname or not db['bars'][bname]['fadein']) then return end
self:GetParent():SetAlpha(0)
end
local function fadeInOut(self)
self:HookScript("OnEnter", fadeIn)
self:HookScript("OnLeave", fadeOut)
self:HookScript("OnShow", fadeOut)
end
local function fadeInHeader(self)
self:SetAlpha(1)
end
 
local function fadeOutHeader(self)
local bname = self:GetName()
if(not bname or not db['bars'][bname]['fadein']) then return end
self:SetAlpha(0)
end
local function fadeInOutHeader(self)
self:HookScript("OnEnter", fadeInHeader)
self:HookScript("OnLeave", fadeOutHeader)
self:HookScript("OnShow", fadeOutHeader)
end
 
addon['fadeInOut'] = fadeInOut
addon['fadeInOutHeader'] = fadeInOutHeader
local function applySettings(bname, bh)
 
db = addon['updateDB'](addon['db']['profile'])
local f = _G[bname]
if(not f) then return end
local spr = db['bars'][bname]['cols']
local y,row = 1,0
local lastbutton = f
_G[bname]:SetAttribute('fadeIn', db['bars'][bname]['fadein'])
f:SetScale(db['bars'][bname]['scale'])
if(f['sbuttons']) then
for i = 1, #f['sbuttons'] do
98,6 → 130,8
btn:ClearAllPoints()
btn:SetParent(parent)
end
fadeInOut(btn)
 
-- print(parent, id, offset, btn:GetName())
return btn
end
105,7 → 139,7
local function createBar(bid,mb)
mb = mb or 12
local yoff =-yoffset - 40 * (bid-1)
local f = CreateFrame("Frame", "zzABar"..bid, UIParent, "SecureHandlerStateTemplate SecureHandlerBaseTemplate",bid == 1 and bid or nil)
local f = CreateFrame("Frame", "zzABar"..bid, UIParent, "SecureHandlerStateTemplate SecureHandlerEnterLeaveTemplate",bid == 1 and bid or nil)
f['sbuttons'] = {}
f['maxslots'] = mb
f:SetWidth(1)
164,6 → 198,14
RegisterStateDriver(f, "showvehicle", "[vehicleui]hide;show")
RegisterAutoHide(f,0.2)
end
f:SetAttribute('_onenter', [[
self:SetAlpha(1)
]])
f:SetAttribute('_onleave', [[
if(self:GetAttribute('fadeIn')) then
self:SetAlpha(0)
end
]])
local lastbutton = f
 
for i = 1, mb do
187,7 → 229,7
end
addon['addDrag'](f)
addon['applySettings'](f:GetName())
 
if(db['bars'][f:GetName()]['fadein']) then fadeOut(lastbutton) end
return f:GetName()
end
 
233,6 → 275,7
addon['AddConfigEntry'](addon, name, 'range', 'cols', 'Colums', 'Number of columns', 0,1,12,1,false,o)
addon['AddConfigEntry'](addon, name, 'range', 'scale', 'Scale', 'Scale of this bar', 1,0.1,3,0.1,true,o)
addon['AddConfigEntry'](addon, name, 'execute', 'center', 'Center', 'Reset position', 2,resetCenter,nil,nil,nil,o)
addon['AddConfigEntry'](addon, name, 'toggle', 'fadein', 'Hide', 'Only show on mouseover', 0,1,12,1,false,o)
end
for i = 1,6 do
addP(createBar(i, NUM_ACTIONBAR_BUTTONS))
252,6 → 295,14
VehicleMenuBar_MoveMicroButtons = function() end
-- hooksecurefunc("ChangeMultiCastActionPage", updateMCB)
hideBlizz()
local exitButton = CreateFrame("BUTTON", name.."ExitButton", UIParent, "SecureHandlerClickTemplate")
exitButton:SetSize(64,64)
exitButton:SetPoint("CENTER",0,0)
exitButton:RegisterForClicks("AnyUp") -- UI-Vehicles-Button-Pitch-Up UI-VEHICLES-BUTTON-PITCHDOWN-UP
exitButton:SetNormalTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Up")
exitButton:SetScript("OnClick", function(self) VehicleExit() end)
addon['addSimpleDrag'](exitButton,"FRAME")
RegisterStateDriver(exitButton, "visibility", "[vehicleui] show;hide")
end
 
addon['startup'](addon, name, name, init, true, defaults)
\ No newline at end of file