Quantcast oUF - canel buffs - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-01-18, 03:32 AM   #1
Lolzen
An Aku'mai Servant
 
Lolzen's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 36
oUF - canel buffs

I searched around and got very old info (2010ish) including haste confirming plans to implement the secure template Auras to enable canceling buffs. Obviously this never came to fruition and was regarded low priority anyways.
I still want to have that and it kinda works using the PostUpdateIcon func, however obviously tainting because of SetAllPoints().
I'm out of ideas for now how to implement it without touching oUFs core, and in addition to that ask if this feature would ever make it into oUF or is regarded useless/niche/wontdo.

Below is my current implementation snippet:
Lua Code:
  1. local PostUpdateIcon = function(icons, unit, button, index, offset, filter, isDebuff)
  2.     local texture = button.icon
  3.     if button.isPlayer then
  4.         texture:SetDesaturated(false)
  5.     else
  6.         texture:SetDesaturated(true)
  7.     end
  8.                
  9.     if not button.clickablearea then
  10.         button.clickablearea = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")
  11.         button.clickablearea:SetAttribute("*type2", "cancelaura")
  12.         button.clickablearea:SetAttribute("index", index)
  13.         button.clickablearea:SetAllPoints(button)
  14.         button.clickablearea:RegisterForClicks("RightButtonUp")
  15.     end
  16. end

I'm just surfacing on grasping the SecureTemplates, so i might have overseen something.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - canel buffs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off