Thread Tools Display Modes
02-08-13, 07:05 AM   #1
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
Coloring auras by their buff/debuff type

Good morrow,

I wanted to inquire about coloring the borders of my buffs and debuffs by their color type. I am aware that enabling showType, showBuffType, or showDebuffType will overlay the appropriate aura with a texture, colored by said aura's type, but is there any way to simply color the 1px by 1px border that already surrounds the aura?

Thank you very much.
  Reply With Quote
02-08-13, 07:41 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Just add a PostCreateIcon function to your layout's Auras/Buffs/Debuffs element that modifies the button.overlay texture object's texture, points, texCoords, etc.

I'm not sure what "1px by 1px border" you're talking about, as oUF doesn't add any such texture to aura buttons. If your layout does, it's probably already using a PostCreateIcon function, in which case you should just get rid of the border texture object, and apply those properties to the button's overlay object instead.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
02-08-13, 08:09 AM   #3
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
Thanks for the reply as usual Phanx;

The oUF layout is my own, and I've not created ANY border for the auras, they inherently have a 1px by 1px border around them. As a reference, here is the code I use to produce my buffs and debuffs.

Lua Code:
  1. lib.generate_Buffs = function(f)
  2.     b = CreateFrame("Frame", nil, f)
  3.     b.size = 19
  4.     b.num = 40
  5.     b.spacing = 1
  6.     b.onlyShowPlayer = false
  7.     b:SetHeight((b.size+b.spacing)*4)
  8.     b:SetWidth(f.width / 2)
  9.     b:SetPoint("BOTTOMLEFT", f, "TOPLEFT", 0, 1)
  10.     b.initialAnchor = "BOTTOMLEFT"
  11.     b["growth-x"] = "RIGHT"
  12.     b["growth-y"] = "UP"
  13.     b.showType = true
  14.        
  15.     f.Buffs = b
  16. end

There are no hooks or callbacks, so the border is definitely inherent; that being said, I want to set the vertex color of said border, but I am not sure how to reference it.
  Reply With Quote
02-08-13, 09:42 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Do you define "local b" anywhere? If not please make sure your variables stay local unless they should be applied to the global scope.

I know that because it is my bug.
http://code.google.com/p/rothui/sour...e/core.lua#334
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
02-08-13, 09:59 AM   #5
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
Good call Zork ;]
  Reply With Quote
02-08-13, 09:13 PM   #6
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
I assume you mean just the border of the stock icons (the thing we always want to remove with SetTexCoord(0.1, 0.9, 0.1, 0.9)). If so then there is no way to color just that part of the texture.

@Phanx
oUF does add a border texture to the aura buttons unless the layout provides its own auras.CreateIcon function.

Last edited by Rainrider : 02-08-13 at 09:18 PM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Coloring auras by their buff/debuff type


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