WoWInterface SVN Buffed

Compare Revisions

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

Rev 14 → Rev 15

Buffed!.toc
1,8 → 1,7
## Interface: 30100
## Title: Buffed!
## Notes: Buff frame mod?
## Version 1.84 Beta
## Version 2.05 Alpha
## Author: Kraftman
## SavedVariables: BuffedSettings, BuffedProfiles
 
Buffed!.lua
\ No newline at end of file
Buffed!.lua
1,5 → 1,8
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, }
BuffedSettings.texture = {"Interface\\AddOns\\Buffed!\\Flat",}
 
local FontColour = {r = 1, g = 1, b = 1, a = 1}
local scale = UIParent:GetScale()
local BuffedSorter = {}
151,7 → 154,7
f.corner:SetPoint("TOPLEFT", f, "CENTER", 5, -5)
f.corner:SetMovable(true)
f.cornerT = f.corner:CreateTexture()
f.cornerT:SetTexture("Interface\\AddOns\\Buffed!\\ResizerButton.tga")
f.cornerT:SetTexture("Interface\\AddOns\\Buffed!\\ResizerButton")
f.cornerT:SetAllPoints(f.corner)
f.corner:Hide()
f.StickyPos = 1
184,7 → 187,7
f:SetScript("OnMouseWheel", function(self, value) local x, y = BGetPoint(f) if IsShiftKeyDown() then BSetPoint(f, x + value, y) else BSetPoint(f, x, y + value) end end)
f.corner:EnableMouse(true)
f.pa = f:CreateTexture()
f.pa:SetTexture("Interface\\AddOns\\Buffed!\\ConfTexture.tga")
f.pa:SetTexture("Interface\\AddOns\\Buffed!\\ConfTexture")
f.pa:SetPoint("TOPLEFT", f, "TOPLEFT", -f.padding, f.padding)
f.pa:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", f.padding, -f.padding)
f.pa:SetVertexColor(1,1,1)
192,7 → 195,7
f.pa:SetAlpha(0.3)
f.pa:Hide()
f.pb = f:CreateTexture()
f.pb:SetTexture("Interface\\AddOns\\Buffed!\\ConfTexture.tga")
f.pb:SetTexture("Interface\\AddOns\\Buffed!\\ConfTexture")
f.pb:SetPoint("TOPLEFT", f, "TOPLEFT", -f.padding, f.padding)
f.pb:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", f.padding, -f.padding)
f.pb:SetVertexColor(1,1,1)
223,7 → 226,7
f.bar:SetPoint("LEFT", f, "RIGHT", 3, 0)
f.bar.tex = f.bar:CreateTexture(nil, "OVERLAY")
f.bar.tex:SetAllPoints(f.bar)
f.bar.tex:SetTexture("Interface\\AddOns\\Buffed!\\Flat.tga")
f.bar.tex:SetTexture("Interface\\AddOns\\Buffed!\\Flat")
f.bar.tex:SetVertexColor(FrameColours[FrameName].r,FrameColours[FrameName].g,FrameColours[FrameName].b, 0.6)
f.bar:EnableMouse(true)
f.bar:SetMovable(true)
265,11 → 268,11
local y = sin((360/25)*count)*4*count
f:SetPoint("CENTER", UIParent, "CENTER", x , y)
f.t = f:CreateTexture()
f.t:SetTexture("Interface\\AddOns\\Buffed!\\ConfTexture.tga")
f.t:SetTexture("Interface\\AddOns\\Buffed!\\ConfTexture")
f.t:SetAllPoints(f)
f.t:SetVertexColor(FrameColours[FrameName].r,FrameColours[FrameName].g,FrameColours[FrameName].b)
f.ti = f:CreateTexture()
f.ti:SetTexture("Interface\\AddOns\\Buffed!\\ConfTexture.tga")
f.ti:SetTexture("Interface\\AddOns\\Buffed!\\ConfTexture")
f.ti:SetAllPoints(f)
f.ti:SetVertexColor(0,0,0)
f.ti:SetTexCoord(1,0,0,1);
402,12 → 405,6
local function BuffedOnLoad(self, event, ...)
if event == "ADDON_LOADED" then
if select(1, ...) == "Buffed!" then
if not BuffedSettings then
BuffedSettings = {}
BuffedSettings.FrameCreation = {TargetBuff = 7, Buff = 7, Debuff = 7, Wep = 2, TargetDebuff = 7, Master = 1, Filter = 20,}
BuffedSettings.duration = false
BuffedSettings.animation = false
end
CreateConfigFrames()
CreateSettingsMenu()
end
428,6 → 425,7
f.bar.horiz = pos.bar.horiz
f.bar:SetWidth(pos.bar.width)
f.bar:SetHeight(pos.bar.height)
f.bar.tex:SetTexture(pos.bar.texture)
f.bar.tex:SetVertexColor(0,0,0)
f.bar.tex:SetVertexColor(pos.bar.r, pos.bar.g, pos.bar.b, pos.bar.a)
BSetPoint(f.bar, pos.bar.x-pos.x, pos.bar.y-pos.y, f, "CENTER")
745,10 → 743,10
x, y = BGetPoint(f.bar)
local r, g, b, a = f.bar.tex:GetVertexColor()
width, height = floor(f.bar:GetWidth() + 0.5), floor(f.bar:GetHeight() + 0.5)
BuffedProfiles[UnitName("player")].combat["Buffed"..FrameName..i].bar = {shown = f.bar:IsShown(), horiz = f.bar.horiz, width = width, height = height, x = x, y = y, r = r, g = g, b = b, a = a}
BuffedProfiles[UnitName("player")].combat["Buffed"..FrameName..i].bar = {shown = f.bar:IsShown(), horiz = f.bar.horiz, width = width, height = height, x = x, y = y, r = r, g = g, b = b, a = a, texture = f.bar.tex:GetTexture()}
x, y = BGetPoint(f.durationb)
width, height = floor(f.durationb:GetWidth() + 0.5), floor(f.durationb:GetHeight() + 0.5)
BuffedProfiles[UnitName("player")].combat["Buffed"..FrameName..i].bar = {shown = f.durationb:IsShown(), width = width, height = height, x = x, y = y}
BuffedProfiles[UnitName("player")].combat["Buffed"..FrameName..i].durationb = {shown = f.durationb:IsShown(), width = width, height = height, x = x, y = y}
end)
end
UIDropDownMenu_AddButton(info, level)
768,7 → 766,7
x, y = BGetPoint(f.bar)
local r, g, b, a = f.bar.tex:GetVertexColor()
width, height = floor(f.bar:GetWidth() + 0.5), floor(f.bar:GetHeight() + 0.5)
BuffedProfiles[UnitName("player")].nocombat["Buffed"..FrameName..i].bar = {shown = f.bar:IsShown(), horiz = f.bar.horiz, width = width, height = height, x = x, y = y, r = r, g = g, b = b, a = a}
BuffedProfiles[UnitName("player")].nocombat["Buffed"..FrameName..i].bar = {shown = f.bar:IsShown(), horiz = f.bar.horiz, width = width, height = height, x = x, y = y, r = r, g = g, b = b, a = a, texture = f.bar.tex:GetTexture()}
x, y = BGetPoint(f.durationb)
width, height = floor(f.durationb:GetWidth() + 0.5), floor(f.durationb:GetHeight() + 0.5)
BuffedProfiles[UnitName("player")].nocombat["Buffed"..FrameName..i].durationb = {shown = f.durationb:IsShown(), width = width, height = height, x = x, y = y}
838,6 → 836,21
info.func = function() ActiveButton.bar.horiz = false end
end
UIDropDownMenu_AddButton(info, level)
elseif value == "Texture" then
for num, val in ipairs(BuffedSettings.texture) do
local valshort = val:match("([^\\]+)$")
info.text = valshort
info.value = val
info.tooltipTitle = val
info.checked = ActiveButton.bar.tex:GetTexture() == val
 
if (ActiveButton:GetName() == "BuffedMaster1") then
info.func = function() ForAllFrames(function(f) f.bar.tex:SetTexture(val) end) end
else
info.func = function() ActiveButton.bar.tex:SetTexture(val) end
end
UIDropDownMenu_AddButton(info, level)
end
end
end
end
1016,7 → 1029,7
buff.dbar:SetHeight(20)
buff.dbar:SetPoint("LEFT", buff, "RIGHT", 3, 0)
buff.dbar:SetOrientation("HORIZONTAL")
buff.dbar:SetStatusBarTexture("Interface\\AddOns\\Buffed!\\Flat.tga")
buff.dbar:SetStatusBarTexture("Interface\\AddOns\\Buffed!\\Flat")
buff.dbar:SetStatusBarColor(0.2, 1, 0.2)
buff.dbar:Hide()
buff.icon = buff:CreateTexture(buff:GetName().."Icon", "HIGH")
1071,6 → 1084,7
else
buff.dbar:SetOrientation("VERTICAL")
end
buff.dbar:SetStatusBarTexture(parent.bar.tex:GetTexture())
buff.dbar:SetStatusBarColor(parent.bar.tex:GetVertexColor())
buff.dbar:SetAllPoints(parent.bar)
buff.dbar:Show()
1194,7 → 1208,7
f.bar.tex:SetVertexColor(0,0,0)
f.bar.tex:SetVertexColor(pos.bar.r, pos.bar.g, pos.bar.b, pos.bar.a)
BSetPoint(f.bar, pos.bar.x-pos.x, pos.bar.y-pos.y, f, "CENTER")
BSetPoint(f.durationb, pos.durationb.x, pos.durationb.y)
BSetPoint(f.durationb, pos.durationb.x-pos.x, pos.durationb.y-pos.y, f, "CENTER")
end
end)
BuffedUpdate("force")
1213,7 → 1227,7
f.bar.tex:SetVertexColor(0,0,0)
f.bar.tex:SetVertexColor(pos.bar.r, pos.bar.g, pos.bar.b, pos.bar.a)
BSetPoint(f.bar, pos.bar.x-pos.x, pos.bar.y-pos.y, f, "CENTER")
BSetPoint(f.durationb, pos.durationb.x, pos.durationb.y)
BSetPoint(f.durationb, pos.durationb.x-pos.x, pos.durationb.y-pos.y, f, "CENTER")
end
end)
BuffedUpdate("force")