WoWInterface SVN Buffed

Compare Revisions

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

Rev 16 → Rev 17

BantoBar.tga Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
Buffed!.lua
1,7 → 1,7
local floor, select, UnitAura, UnitName, GetTime, next, pairs = floor, select, UnitAura, UnitName, GetTime, next, pairs
 
BuffedSettings = {FrameCreation = {TargetBuff = 7, Buff = 7, Debuff = 7, Wep = 2, TargetDebuff = 7, Master = 1, Filter = 20,}, duration = false, }
local texturelist = {"Interface\\AddOns\\Buffed!\\Flat",}
local texturelist = {"Interface\\AddOns\\Buffed!\\Flat","Interface\\AddOns\\Buffed!\\BantoBar"}
 
local FontColour = {r = 1, g = 1, b = 1, a = 1}
local scale = UIParent:GetScale()
484,24 → 484,6
UIDropDownMenu_SetSelectedValue(this.owner, this.value);
end
 
local function MasterOptions(var, val1, val2)
if ActiveButton[var] then
for FrameName, FrameNum in pairs(BuffedSettings.FrameCreation) do
for i = 1, FrameNum do
local f = _G["Buffed"..FrameName..i];
f[var] = val1
end
end
else
for FrameName, FrameNum in pairs(BuffedSettings.FrameCreation) do
for i = 1, FrameNum do
local f = _G["Buffed"..FrameName..i];
f[var] = val2
end
end
end
end
 
local function DropDownTest_Initialize(self, level) -- the menu items, needs a cleanup
level = level or 1
local info = UIDropDownMenu_CreateInfo()
514,7 → 496,11
info.tooltipTitle = "Sticky Positioning"
info.tooltipText = "Aligns the buffs with other nearby buffs"
if (ActiveButton:GetName() == "BuffedMaster1") then
info.func = function() MasterOptions("StickyPos", nil, 1) end
info.func = function() if ActiveButton.StickyPos then
ForAllFrames(function(f)f.StickyPos = nil end)
else
ForAllFrames(function(f)f.StickyPos = nil end)
end end
else
info.func = function() if ActiveButton.StickyPos then ActiveButton.StickyPos = nil else ActiveButton.StickyPos = 1 end end
end
526,11 → 512,14
info.tooltipTitle = "Sticky Sizing"
info.tooltipText = "Sets the size of the buff to other nearby buffs"
if (ActiveButton:GetName() == "BuffedMaster1") then
info.func = function() MasterOptions("StickySize", nil, 1) end
info.func = function() if ActiveButton.StickySize then
ForAllFrames(function(f)f.StickySize = nil end)
else
ForAllFrames(function(f)f.StickySize = 1 end)
end end
else
info.func = function() if ActiveButton.StickySize then ActiveButton.StickySize = nil else ActiveButton.StickySize = 1 end end
end
 
UIDropDownMenu_AddButton(info, level)
 
info.text = "Sticky Padding"
543,14 → 532,7
if (ActiveButton.padding == 10) then
ForAllFrames(function(f)f.padding = 0 end)
else
for FrameName, FrameNum in pairs(BuffedSettings.FrameCreation) do
for i = 1, FrameNum do
local f = _G["Buffed"..FrameName..i]
if f then
f.padding = 10
end
end
end
ForAllFrames(function(f)f.padding = 10 end)
end
end
else
966,7 → 948,7
buff:Hide();
buff.duration:Hide();
end
return nil;
return nil
else
local helpful = (filter == "HELPFUL");
if not buff then -- If button doesn't exist make it
1074,7 → 1056,7
GameTooltip:SetUnitAura(unit, index, filter);
end
end
return 1;
return true;
end
 
local function BuffedSort(num, unit, filter)
1086,7 → 1068,6
expirationTime = GetTime() + 100000 + i
end
BuffedSorter[i] = {expTime = expirationTime, number = i }
 
end
if next(BuffedSorter) then
table.sort(BuffedSorter, function (a,b) return a.expTime < b.expTime end)