Thread Tools Display Modes
08-04-10, 03:34 PM   #1
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Aura Remaining text alternate setpoints (buff/debuff)

How do I create two different setpoints, one for buffs and one for debuffs?

Code:
local auraIcon = function(auras, button)
	button.count:ClearAllPoints()
	button.count:SetPoint("TOPRIGHT", 1, 0)
	button.count:SetJustifyH("RIGHT")
	button.count:SetFontObject(GameFontNormalSmall)
	button.count:SetTextColor(.8, .8, .8)
	
	auras.disableCooldown = true

	button.icon:SetTexCoord(.1, .9, .1, .9)
	button.bd = SetBD(button, backdrop, sett1ngs.bcolor);
	button.overlay:Hide()
	
	local remaining = button:CreateFontString(nil, "OVERLAY")
	remaining:SetPoint("BOTTOM", 1, -8.5)
	remaining:SetFontObject(GameFontNormalSmall)
	remaining:SetTextColor(.8, .8, .8)
	remaining:SetJustifyH('LEFT')
	button.remaining = remaining
end
__________________

  Reply With Quote
08-04-10, 05:39 PM   #2
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Code:
self.Debuffs = CreateFrame("Frame", nil, self)
		self.Debuffs.PostCreateIcon = PostCreateAura
		self.Debuffs.size = 21
		self.Debuffs:SetHeight(self.Debuffs.size)
		self.Debuffs:SetWidth(self.Debuffs.size * 6)
		self.Debuffs:SetPoint("TOPLEFT", self, "BOTTOMLEFT", -1, -17)
		self.Debuffs.initialAnchor = "BOTTOMLEFT"
		self.Debuffs["growth-y"] = "DOWN"
		self.Debuffs.filter = false
		self.Debuffs.num = 15
		self.Debuffs.spacing = 2
or replace with buffs. Make sure this is in your Style, not your local functions

Last edited by Ferous : 08-04-10 at 05:41 PM.
  Reply With Quote
08-04-10, 06:50 PM   #3
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Oh, perhaps I didn't explain well enough.
I only want to change the remaining text (as per the title) not the actual buff/debuff, those I have placed where I want them to be.
__________________

  Reply With Quote
08-04-10, 07:20 PM   #4
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
You create two different auraIcon functions, one for buffs and one for debuffs.
  Reply With Quote
08-04-10, 07:46 PM   #5
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
And how do I do that?

Also, Is there not a way to just check if the aura is a buff then remaining:setpoint, else remaining:setpoint.?
__________________

  Reply With Quote
08-04-10, 07:48 PM   #6
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Ah okay nvm I didn't get what you wanted to do

edit - I have no idea. :P
  Reply With Quote
08-04-10, 08:55 PM   #7
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Code:
local auraIcon = function(auras, button)
	blah blah
end

local auraIcon2 = function(auras, button)
	blah blah
end

self.Buffs.PostCreateIcon = auraIcon

self.Debuffs.PostCreateIcon = auraIcon2
  Reply With Quote
08-05-10, 08:20 AM   #8
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Thanks man, will try that out.

Worked like a charm, Thanks a lot.
__________________


Last edited by sacrife : 08-05-10 at 10:37 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Aura Remaining text alternate setpoints (buff/debuff)


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