Download
(3Kb)
Download
Updated: 08-16-18 01:28 PM
Pictures
File Info
Compatibility:
Battle for Azeroth (8.0.1)
Updated:08-16-18 01:28 PM
Created:11-17-10 04:06 PM
Downloads:28,812
Favorites:126
MD5:

rBuffFrame  Popular! (More than 5000 hits)

Version: 800.20180816
by: zork [More]


Intro

rBuffFrame is a framework for Blizzard player aura buttons. It does nothing on its own, needs a layout like rBuffFrame_Zork.
API documentation
rBuffFrame API documentation
Quick-Links
rActionBar, rActionBar_Zork, rBuffFrame, rBuffFrame_Zork, rButtonTemplate, rButtonTemplate_Zork
Requires
rLib
Git
https://github.com/zorker/rothui/tre...8.0/rBuffFrame

Optional Files (2)
File Name
Version
Size
Author
Date
Type
800.20180816
972B
08-16-18 01:30 PM
Addon
700.20161004
975B
10-04-16 06:16 AM
Addon


Post A Reply Comment Options
Unread 02-01-20, 12:36 PM  
wira
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Can't hide debuff original border

UPDATE: I found a solution within nBuff addon:

I replaced the function "rBuffFrame:PostCreateAuraButton(buttonList)" with the function bellow:

Lua Code:
  1. hooksecurefunc("AuraButton_Update", function(self, index)
  2.     local button = _G[self..index]
  3.     if button and not button.Shadow then
  4.         local border = _G[self..index.."Border"]
  5.         if border then
  6.             border:SetPoint("TOPLEFT", button, -3, 2)
  7.             border:SetPoint("BOTTOMRIGHT", button, 2, -2)
  8.             border:SetTexture("Interface\\Buttons\\UI-Debuff-Overlays")
  9.             border:SetTexCoord(0.296875, 0.5703125, 0, 0.515625)
  10.             border.SetBorderColor = AuraButton_SetBorderColor
  11.         end
  12.     end
  13. end)

Hello, I am modifying your addon a little just to simply determine the position and size of buffs/debuffs.

The only problem is that I can't remove the original border from the debuff icon as you can see in the image:



Below is the lua code I am using:

Lua Code:
  1. -- rBuffFrame: core
  2. -- zork, 2016
  3.  
  4. -----------------------------
  5. -- Variables
  6. -----------------------------
  7.  
  8. local A, L = ...
  9.  
  10. L.addonName = A
  11.  
  12. -----------------------------
  13. -- Hide Blizzard BuffFrame
  14. -----------------------------
  15.  
  16. --local hiddenFrame = CreateFrame("Frame")
  17. --hiddenFrame:Hide()
  18. --BuffFrame:SetParent(hiddenFrame)
  19.  
  20. -----------------------------
  21. -- rBuffFrame Global
  22. -----------------------------
  23.  
  24. rBuffFrame = {}
  25. rBuffFrame.addonName = A
  26.  
  27. -----------------------------
  28. -- Functions
  29. -----------------------------
  30.  
  31. local function GetButtonList(buttonName,numButtons,buttonList)
  32.   buttonList = buttonList or {}
  33.   for i=1, numButtons do
  34.     local button = _G[buttonName..i]
  35.     if not button then break end
  36.     if button:IsShown() then
  37.       table.insert(buttonList, button)
  38.     end
  39.   end
  40.   return buttonList
  41. end
  42.  
  43. --points
  44. --1. p1, f, fp1, fp2
  45. --2. p2, rb-1, p3, bm1, bm2
  46. --3. p4, b-1, p5, bm3, bm4
  47. local function SetupButtonPoints(frame, buttonList, buttonWidth, buttonHeight, numCols, p1, fp1, fp2, p2, p3, bm1, bm2, p4, p5, bm3, bm4)
  48.   for index, button in next, buttonList do
  49.     button:SetSize(buttonWidth, buttonHeight)
  50.     button:ClearAllPoints()
  51.     if index == 1 then
  52.       button:SetPoint(p1, frame, fp1, fp2)
  53.     elseif numCols == 1 or mod(index, numCols) == 1 then
  54.       button:SetPoint(p2, buttonList[index-numCols], p3, bm1, bm2)
  55.     else
  56.       button:SetPoint(p4, buttonList[index-1], p5, bm3, bm4)
  57.     end
  58.   end
  59.  
  60. end
  61.  
  62. local function SetupButtonFrame(frame, framePadding, buttonList, buttonWidth, buttonHeight, buttonMargin, numCols, startPoint, rowMargin)
  63.   local numButtons = # buttonList
  64.   numCols = max(min(numButtons, numCols),1)
  65.   local numRows = max(ceil(numButtons/numCols),1)
  66.   if not rowMargin then
  67.     rowMargin = buttonMargin
  68.   end
  69.   local frameWidth = numCols*buttonWidth + (numCols-1)*buttonMargin + 2*framePadding
  70.   local frameHeight = numRows*buttonHeight + (numRows-1)*rowMargin + 2*framePadding
  71.   frame:SetSize(frameWidth,frameHeight)
  72.   --TOPLEFT
  73.   --1. TL, f, p, -p
  74.   --2. T, rb-1, B, 0, -m
  75.   --3. L, b-1, R, m, 0
  76.   if startPoint == "TOPLEFT" then
  77.     SetupButtonPoints(frame, buttonList, buttonWidth, buttonHeight, numCols, startPoint, framePadding, -framePadding, "TOP", "BOTTOM", 0, -rowMargin, "LEFT", "RIGHT", buttonMargin, 0)
  78.   --end
  79.   --TOPRIGHT
  80.   --1. TR, f, -p, -p
  81.   --2. T, rb-1, B, 0, -m
  82.   --3. R, b-1, L, -m, 0
  83.   elseif startPoint == "TOPRIGHT" then
  84.     SetupButtonPoints(frame, buttonList, buttonWidth, buttonHeight, numCols, startPoint, -framePadding, -framePadding, "TOP", "BOTTOM", 0, -rowMargin, "RIGHT", "LEFT", -buttonMargin, 0)
  85.   --end
  86.   --BOTTOMRIGHT
  87.   --1. BR, f, -p, p
  88.   --2. B, rb-1, T, 0, m
  89.   --3. R, b-1, L, -m, 0
  90.   elseif startPoint == "BOTTOMRIGHT" then
  91.     SetupButtonPoints(frame, buttonList, buttonWidth, buttonHeight, numCols, startPoint, -framePadding, framePadding, "BOTTOM", "TOP", 0, rowMargin, "RIGHT", "LEFT", -buttonMargin, 0)
  92.   --end
  93.   --BOTTOMLEFT
  94.   --1. BL, f, p, p
  95.   --2. B, rb-1, T, 0, m
  96.   --3. L, b-1, R, m, 0
  97.   --elseif startPoint == "BOTTOMLEFT" then
  98.   else
  99.     startPoint = "BOTTOMLEFT"
  100.     SetupButtonPoints(frame, buttonList, buttonWidth, buttonHeight, numCols, startPoint, framePadding, framePadding, "BOTTOM", "TOP", 0, rowMargin, "LEFT", "RIGHT", buttonMargin, 0)
  101.   end
  102. end
  103.  
  104. function rBuffFrame:CreateBuffFrame(addonName,cfg)
  105.   cfg.frameName = addonName.."BuffFrame"
  106.   cfg.frameParent = cfg.frameParent or UIParent
  107.   cfg.frameTemplate = nil
  108.   --create new parent frame for buttons
  109.   local frame = CreateFrame("Frame", cfg.frameName, cfg.frameParent, cfg.frameTemplate)
  110.   frame:SetPoint(unpack(cfg.framePoint))
  111.   frame:SetScale(cfg.frameScale)
  112.   local function UpdateAllBuffAnchors()
  113.     --add temp enchant buttons
  114.     local buttonList = GetButtonList("TempEnchant",BuffFrame.numEnchants)
  115.     --add all other buff buttons
  116.     buttonList = GetButtonList("BuffButton",BUFF_MAX_DISPLAY,buttonList)
  117.     --adjust frame by button list
  118.     SetupButtonFrame(frame, cfg.framePadding, buttonList, cfg.buttonWidth, cfg.buttonHeight, cfg.buttonMargin, cfg.numCols, cfg.startPoint, cfg.rowMargin)
  119.   end
  120.   hooksecurefunc("BuffFrame_UpdateAllBuffAnchors", UpdateAllBuffAnchors)
  121.   return frame
  122. end
  123.  
  124. function rBuffFrame:CreateDebuffFrame(addonName,cfg)
  125.   cfg.frameName = addonName.."DebuffFrame"
  126.   cfg.frameParent = cfg.frameParent or UIParent
  127.   cfg.frameTemplate = nil
  128.   --create new parent frame for buttons
  129.   local frame = CreateFrame("Frame", cfg.frameName, cfg.frameParent, cfg.frameTemplate)
  130.   frame:SetPoint(unpack(cfg.framePoint))
  131.   frame:SetScale(cfg.frameScale)
  132.  
  133.   local function UpdateAllDebuffAnchors(buttonName, index)
  134.     --add all other debuff buttons
  135.     local buttonList = GetButtonList("DebuffButton",DEBUFF_MAX_DISPLAY,buttonList)
  136.     --adjust frame by button list
  137.     SetupButtonFrame(frame, cfg.framePadding, buttonList, cfg.buttonWidth, cfg.buttonHeight, cfg.buttonMargin, cfg.numCols, cfg.startPoint, cfg.rowMargin)
  138.     rBuffFrame:PostCreateAuraButton(buttonList)
  139.   end
  140.   hooksecurefunc("DebuffButton_UpdateAnchors", UpdateAllDebuffAnchors)
  141.   return frame
  142. end
  143.  
  144. function rBuffFrame:PostCreateAuraButton(buttonList)
  145.     for index, button in next, buttonList do
  146.  
  147.         button.border = button:CreateTexture(nil, "BORDER")
  148.         button.border:SetPoint("TOPLEFT", button, -3, 2)
  149.         button.border:SetPoint("BOTTOMRIGHT", button, 2, -2)
  150.  
  151.         button.border:SetTexture("Interface\\Buttons\\UI-Debuff-Overlays")
  152.         button.border:SetTexCoord(0.296875, 0.5703125, 0, 0.515625)
  153.        
  154.         local bcolor = button.border:GetVertexColor()
  155.         button.border:SetVertexColor(bcolor) --(1, 0, 0, 1)
  156.     end
  157. end
  158.  
  159. -----------------------------
  160. -- buffFrameConfig
  161. -----------------------------
  162.  
  163. local buffFrameConfig = {
  164.   --framePoint      = { "TOPRIGHT", Minimap, "TOPLEFT", -5, -5 },
  165.   framePoint      = { "TOPRIGHT", Minimap, "TOPLEFT", -40, 15 },
  166.   frameScale      = 1,
  167.   framePadding    = 5,
  168.   buttonWidth     = 40,
  169.   buttonHeight    = 40,
  170.   buttonMargin    = 5,
  171.   numCols         = 10,
  172.   startPoint      = "TOPRIGHT",
  173.   rowMargin       = 20,
  174. }
  175. --create
  176. local buffFrame = rBuffFrame:CreateBuffFrame(A, buffFrameConfig)
  177.  
  178. -----------------------------
  179. -- debuffFrameConfig
  180. -----------------------------
  181.  
  182. local debuffFrameConfig = {
  183.   framePoint      = { "TOPRIGHT", buffFrame, "BOTTOMRIGHT", 0, -10 },
  184.   frameScale      = 1,
  185.   framePadding    = 5,
  186.   buttonWidth     = 64,
  187.   buttonHeight    = 64,
  188.   buttonMargin    = 5,
  189.   numCols         = 8,
  190.   startPoint      = "TOPRIGHT",
  191. }
  192. --create
  193. rBuffFrame:CreateDebuffFrame(A, debuffFrameConfig)

Thanks to anyone in advance if you can help me with this problem.
Last edited by wira : 02-10-20 at 02:21 PM.
Report comment to moderator  
Reply With Quote
Unread 07-08-19, 11:05 AM  
moet
A Kobold Labourer

Forum posts: 1
File comments: 2
Uploads: 0
Originally Posted by superfula
Hey just poking those that follow this to see if anyone else is running into or has a fix for the SetPoint errors due to the recent 8.2 API changes
Yeah I'm running into that error as well after the 8.2 changes (https://us.forums.blizzard.com/en/wo...azshara/202487)
Report comment to moderator  
Reply With Quote
Unread 07-04-19, 05:54 PM  
superfula
A Deviate Faerie Dragon

Forum posts: 14
File comments: 6
Uploads: 0
Hey just poking those that follow this to see if anyone else is running into or has a fix for the SetPoint errors due to the recent 8.2 API changes
Report comment to moderator  
Reply With Quote
Unread 06-10-19, 06:44 AM  
beercray
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
hello!Please update the addon under the Bfa.Thank you:)
Report comment to moderator  
Reply With Quote
Unread 10-04-16, 07:03 AM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
rBuffFrame is updated for Legion.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Report comment to moderator  
Reply With Quote
Unread 08-19-16, 01:51 PM  
SidDii
A Kobold Labourer

Forum posts: 0
File comments: 16
Uploads: 0
Hi!Please update the addon under the Legion.Thank you.
Report comment to moderator  
Reply With Quote
Unread 08-09-16, 12:19 PM  
Schazey
A Kobold Labourer
 
Schazey's Avatar

Forum posts: 0
File comments: 65
Uploads: 0
Can u add option to sort buffs and debuffs by duration left? Also will you update this addon for legion? I want my buffs and debuffs to look like this again only with sort by duration.

http://imgur.com/w4xip2v
Last edited by Schazey : 08-09-16 at 12:21 PM.
Report comment to moderator  
Reply With Quote
Unread 08-08-16, 09:57 PM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 503
Uploads: 10
Originally Posted by badness
How close are you to finishing or working on a new buff addon? rBuffFrameStyler isn't currently working with prepatch
http://www.wowinterface.com/download...e_Default.html

on that page, also download the addon listed as a "requirement", it's required.. obviously :P
Report comment to moderator  
Reply With Quote
Unread 07-21-16, 09:25 AM  
badness
A Cliff Giant
 
badness's Avatar

Forum posts: 74
File comments: 54
Uploads: 0
How close are you to finishing or working on a new buff addon? rBuffFrameStyler isn't currently working with prepatch
Report comment to moderator  
Reply With Quote
Unread 06-21-16, 03:42 AM  
eiszeit
A Chromatic Dragonspawn
 
eiszeit's Avatar
AddOn Author - Click to view AddOns

Forum posts: 154
File comments: 448
Uploads: 7
Originally Posted by zork
Yes. Nxt on my list.
I know why you are my favorite addon author. Thanks!

Also, I love that the visual of the mod and the core itself are now seperate. Much, much easier for customization and updating.
__________________
Lyn • I'm a mess of unfinished thoughts
Last edited by eiszeit : 06-21-16 at 03:43 AM.
Report comment to moderator  
Reply With Quote
Unread 06-19-16, 02:01 PM  
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1740
File comments: 3728
Uploads: 77
Yes. Nxt on my list.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
Report comment to moderator  
Reply With Quote
Unread 06-18-16, 12:34 PM  
eiszeit
A Chromatic Dragonspawn
 
eiszeit's Avatar
AddOn Author - Click to view AddOns

Forum posts: 154
File comments: 448
Uploads: 7
Hey zork, quick question, are you planning on creating a new buff addon?
(Especially with the option for an own debuff anchor)
__________________
Lyn • I'm a mess of unfinished thoughts
Report comment to moderator  
Reply With Quote
Unread 05-16-16, 08:51 AM  
ceylina
A Wyrmkin Dreamwalker

Forum posts: 50
File comments: 93
Uploads: 0
BTW ConsolidatedBuffs has been removed with legion. It's causing an error to be thrown. Since class buffs and by proxy consolidated buffs are removed in legion, looks like this section of code is simply no longer needed.
Last edited by ceylina : 05-16-16 at 09:09 AM.
Report comment to moderator  
Reply With Quote
Unread 02-21-16, 01:48 PM  
ceylina
A Wyrmkin Dreamwalker

Forum posts: 50
File comments: 93
Uploads: 0
I have no idea what took me so long to find this but thank you! It's exactly what I want and the config makes it so I don't have to bother with saved variables. I was able to remove three addons and just use this.

Let's hope nothing major changes for legion
Report comment to moderator  
Reply With Quote
Unread 09-13-15, 10:27 AM  
itsjustadrian
A Murloc Raider

Forum posts: 7
File comments: 1
Uploads: 0
Originally Posted by Xully
hi , is there possible chance to add a "Caster" name on the buff/debuff, as if i got rejuvenation, i want to know who casted it, or for exmaple if a hunter in my LFR have aspec fo daze on , i can see who the retard is, thanks
that's an option that depends on tooltips. try out rTooltip.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: