Quantcast
rectangle aura question - WoWInterface
Thread Tools Display Modes
03-07-11, 01:07 PM   #1
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
rectangle aura question

I want to achieve a rectangle shape, about Size(width, height*0.8).

oUF only sets a square size by default: SetSize(size, size) instead of 2 separate values. Which means I had to used this code in PostCreateIcon.

Code:
	button:SetSize(cfg.buSize, cfg.buSize*cfg.buHeightMulti)
This obviously works fine, but will override any aura size settings for any .buff, .debuff or .aura. And that's actually what bothers me, because I would like to maintain a little control over sizes. At the very least one size for party/raid and one size for everything else.

Now I tried to copy paste the PostCreateIcon function, name it PostCreateIconRaid and use this for party/raid. But this wasn't working as expected, maybe because it was some issue with oUF at this point (has been a while since I tried).


Anyway, what I'm interested in:
Is there a cleaner/smarter solution than copy and pasting the whole PostCreateIcon function? The function contains a lot more code and just to change ONE single line seems quite stupid. Besides of that it might cause issues - as I mentioned above (even though I might have done it just wrong after all) - when using two PostCreateIcon functions at once.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
03-07-11, 06:55 PM   #2
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Consider it solved. FYI, I ended up with this:

Code:
local PostCreateIconRaid = function(Auras, button)
	PostCreateIcon(Auras, button) -- inject the default create icon function's settings
	button.time:SetFont(cfg.NumbFont, 11, cfg.fontFAura)	
	button:SetSize(22, 22)
end
Seems like the issue I encountered the last time was related to the "GameTooltip:SetUnitAura(self.parent.__owner.unit, self:GetID(), self.filter)" fix.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » rectangle aura question

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