Category: oUF: Plugins
Addon Information
Works with 3.1
Download Latest Version.
To add favorites please register for a free account. If you already have one you need to login. How do I install this? (FAQ)
p3lim's Portal Bug Reports Feature Requests

This file is a Addon for oUF by haste. You must have that installed before this Addon will work.

Author:
Version:
30100.20
Date:
05-10-2009 06:35 PM
Size:
1.29 Kb
Downloads:
7,287
Favorites:
127
MD5:
oUF BarFader   Popular! (More than 5000 hits)
Description:
oUF BarFader is a element plug-in made for the UnitFrame framework oUF.
It is required that you have this addon updated at all times to make everything work as it should.
You can download oUF by clicking on the link located under the "Download" button on the right.


Features:
  • Fade out frames based on conditions of the unit
  • Max alpha on the following conditions (in this order)
    • Unit is casting
    • Unit is in combat
    • Unit is low happiness (only on pet frame)
    • Unit has a target
    • Unit has low health/mana (supports rage/runic/energy etc)
  • If all above conditions are false set min alpha else

Note:
Read the documentation inside the lua file for usage.
You need to add this addon to your layout's toc metadata!


Click here and follow steps how to submit a bug
  Change Log - oUF BarFader
30100.20:
- Fixed a premature mistake

30100.19:
- Updated toc to 3.1

30000.18:
- Fixed issues with Rage and RunicPower classes

30000.17:
- Fixed updating issues

30000.16:
- Removed unintentional header support

30000.15:
- Added all units support
- Removed useless events

30000.14:
- Fixed bugs

30000.13:
- Rewrite to reflect changes in oUF

30000.12:
- Fixed channeling issue

30000.11:
- Fixed for Death Knights
- Removed useless code

30000.10:
- Added more support

30000.9:
- Update to 30000

20400.8:
- Added documentation
- Changed the booleans

20400.6:
- Added seperate unit conditions

20400.5:
- Changed the handler

20400.3:
- Initial commit
  Archived Versions - oUF BarFader
File Name
Version
Size
Author
Date
30100.19
1kB
p3lim
04-17-2009 10:34 AM
30000.18
1kB
p3lim
02-10-2009 10:02 AM
30000.17
1kB
p3lim
02-07-2009 02:37 PM
30000.16
1kB
p3lim
01-27-2009 01:43 PM
30000.15
1kB
p3lim
01-23-2009 04:13 PM
30000.14
1kB
p3lim
12-20-2008 10:36 PM
  Comments - oUF BarFader
Post A Reply
Author Comments Comment Options
Old 06-20-2009, 04:40 PM  
Purity
A Deviate Faerie Dragon

Forum posts: 14
File comments: 111
Uploads: 0
Quote:
Originally posted by Barosh
I dont know how to activate this addon.

In my coree.toc is already "## OptionalDeps: oUF_BarFader"

What else must I do?
I pasted this into the layout I was using. (after adding it as an optional dep, too)

Code:
   --[[ oUF_BarFader support ]]
    if(unit=="player" and IsAddOnLoaded("oUF_BarFader")) then
        self.BarFade = true
        self.BarFaderMinAlpha = 0
        self.BarFaderMaxAlpha = 1
end
Maybe that will get it working for you. Adjust as needed. Good luck!
__________________
Purity is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 04-13-2009, 07:26 AM  
p3lim
A Scalebane Royal Guard
 
p3lim's Avatar
Interface Author - Click to view interfaces

Forum posts: 441
File comments: 756
Uploads: 18
Quote:
Originally posted by grimgaw
Any chance of adding 'smooth fade' à la oUF Smooth (but obviously for opacity instead of hp/energy update)
Add it as a feature request and Ill look into it
p3lim is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 04-12-2009, 10:50 AM  
grimgaw
A Kobold Labourer

Forum posts: 0
File comments: 9
Uploads: 0
Any chance of adding 'smooth fade' à la oUF Smooth (but obviously for opacity instead of hp/energy update)
grimgaw is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 03-21-2009, 07:18 AM  
p3lim
A Scalebane Royal Guard
 
p3lim's Avatar
Interface Author - Click to view interfaces

Forum posts: 441
File comments: 756
Uploads: 18
Quote:
Read the documentation inside the lua file for usage.
p3lim is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 03-21-2009, 04:23 AM  
Barosh
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
I dont know how to activate this addon.

In my coree.toc is already "## OptionalDeps: oUF_BarFader"

What else must I do?
Barosh is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-20-2009, 01:28 AM  
HAHADORI
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Quote:
Originally posted by HAHADORI
First of all thanx for everything..
well.. while i am using your layout with 'OUF_barfader', i got a small problem. the function of barfader is that, when target is exsist, it changes the values of alpha as you know. so i set it up, when the target is not exist, then the player fade out. But the barfader make the frame of target fade out too, when target is exist.

um.. i don't kow you can understand what i am saying... if you cant, plz let me know your e-mail address. i have a screenshot so i will send it to you.

PS. actually, i dont know it is the problem up to your layout or 'OUF_barfader'/
so i will post it on 'OUF_barfader' too//

thanx.
I fixed it by callean's help.. thanx anyway for everything!!
HAHADORI is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-20-2009, 12:35 AM  
HAHADORI
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
First of all thanx for everything..
well.. while i am using your layout with 'OUF_barfader', i got a small problem. the function of barfader is that, when target is exsist, it changes the values of alpha as you know. so i set it up, when the target is not exist, then the player fade out. But the barfader make the frame of target fade out too, when target is exist.

um.. i don't kow you can understand what i am saying... if you cant, plz let me know your e-mail address. i have a screenshot so i will send it to you.

PS. actually, i dont know it is the problem up to your layout or 'OUF_barfader'/
so i will post it on 'OUF_barfader' too//

thanx.
HAHADORI is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-27-2009, 04:29 PM  
HAHADORI
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Re: Re: Error report

Quote:
Originally posted by gagou
this is the error I got in my previous post, you can fix it by applying the modification I gave but I'm not sure this is the best way to solve it.

//gagou
Actually.. I tried to fix the errors by your modification.. but I got a same error.

//p3lim
now it works properly!! thanks for your quick response

Last edited by HAHADORI : 01-27-2009 at 05:25 PM.
HAHADORI is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-27-2009, 01:35 PM  
p3lim
A Scalebane Royal Guard
 
p3lim's Avatar
Interface Author - Click to view interfaces

Forum posts: 441
File comments: 756
Uploads: 18
Re: BarFader with party support

Quote:
Originally posted by gagou
it seems that oUF_BarFader now support all units but when I join a party I got a problem with UnitAffectingCombat(unit) because unit is nil
to solve this problem I had to test the existence of unit so the function update transform in:

Code:
local function Update(self)
	local unit = self.unit
	if unit then
		if(self.Castbar and (self.Castbar.casting or self.Castbar.channeling)) then
			self:SetAlpha(self.BarFadeMaxAlpha or 1)
		elseif(UnitAffectingCombat(unit)) then
			self:SetAlpha(self.BarFadeMaxAlpha or 1)
		elseif(unit == 'pet' and GetPetHappiness()) then
			self:SetAlpha((GetPetHappiness() < 3) and (self.BarFadeMaxAlpha or 1) or (self.BarFadeMinAlpha or 0.25))
		elseif(UnitExists(unit..'target')) then
			self:SetAlpha(self.BarFadeMaxAlpha or 1)
		elseif(Regenerating(unit)) then
			self:SetAlpha(self.BarFadeMaxAlpha or 1)
		else
			self:SetAlpha(self.BarFadeMinAlpha or 0.25)
		end
	end
end
(I did some debuging and found that the first call to the function update for party have nil as unit)

in my layout I spawn the party with
local party = oUF:Spawn('header', 'oUF_Party')
party:SetManyAttributes('yOffset', -5, 'showParty', true)

I tried also with
party:SetManyAttributes('yOffset', -5, 'showParty', true, 'showPlayer', true) to check if the first unit in party won't be nil, but no change it's still nil.

is it a problem with oUF_BarFader or directly with oUF?
It wasnt meant to support headers, ill fix it right away

Next time use bug report system on my portal

Last edited by p3lim : 01-27-2009 at 01:36 PM.
p3lim is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-27-2009, 09:01 AM  
gagou
A Defias Bandit
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 140
Uploads: 1
Re: Error report

Quote:
Originally posted by HAHADORI
First of all thanks for your addon!!
I got an this error.. and i cant figure out how to solve this peoblem.
could u test it and find a way to fix it?

And i also got a problen when i am in party... Barfader eliinate the all party framse ...

Interface\AddOns\oUF_BarFader\oUF_BarFader.lua:28: Usage: UnitAffectingCombat("unit")
Count: 2

Call Stack:
[C]: ?
[C]: in function `UnitAffectingCombat'
Interface\AddOns\oUF_BarFader\oUF_BarFader.lua:28: in function <Interface\AddOns\oUF_BarFader\oUF_BarFader.lua:23>
Interface\AddOns\oUF_BarFader\oUF_BarFader.lua:43: in function `enable'
Interface\AddOns\oUF\ouf.lua:382: in function `EnableElement'
Interface\AddOns\oUF\ouf.lua:237: in function <Interface\AddOns\oUF\ouf.lua:190>
Interface\AddOns\oUF\ouf.lua:255: in function `configFunction'
Interface\FrameXML\SecureTemplates.lua:518: in function <Interface\FrameXML\SecureTemplates.lua:515>
[C]: in function `securecall'
Interface\FrameXML\SecureTemplates.lua:525: in function `SetupUnitButtonConfiguration'
Interface\FrameXML\SecureTemplates.lua:604: in function <Interface\FrameXML\SecureTemplates.lua:558>
Interface\FrameXML\SecureTemplates.lua:747: in function `SecureGroupHeader_Update'
[string "*:OnShow"]:1: in function <[string "*:OnShow"]:1>
[C]: in function `Show'
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:702: in main chunk
this is the error I got in my previous post, you can fix it by applying the modification I gave but I'm not sure this is the best way to solve it.
gagou is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-27-2009, 08:21 AM  
HAHADORI
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Error report

First of all thanks for your addon!!
I got an this error.. and i cant figure out how to solve this peoblem.
could u test it and find a way to fix it?

And i also got a problen when i am in party... Barfader eliinate the all party framse ...

Interface\AddOns\oUF_BarFader\oUF_BarFader.lua:28: Usage: UnitAffectingCombat("unit")
Count: 2

Call Stack:
[C]: ?
[C]: in function `UnitAffectingCombat'
Interface\AddOns\oUF_BarFader\oUF_BarFader.lua:28: in function <Interface\AddOns\oUF_BarFader\oUF_BarFader.lua:23>
Interface\AddOns\oUF_BarFader\oUF_BarFader.lua:43: in function `enable'
Interface\AddOns\oUF\ouf.lua:382: in function `EnableElement'
Interface\AddOns\oUF\ouf.lua:237: in function <Interface\AddOns\oUF\ouf.lua:190>
Interface\AddOns\oUF\ouf.lua:255: in function `configFunction'
Interface\FrameXML\SecureTemplates.lua:518: in function <Interface\FrameXML\SecureTemplates.lua:515>
[C]: in function `securecall'
Interface\FrameXML\SecureTemplates.lua:525: in function `SetupUnitButtonConfiguration'
Interface\FrameXML\SecureTemplates.lua:604: in function <Interface\FrameXML\SecureTemplates.lua:558>
Interface\FrameXML\SecureTemplates.lua:747: in function `SecureGroupHeader_Update'
[string "*:OnShow"]:1: in function <[string "*:OnShow"]:1>
[C]: in function `Show'
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:702: in main chunk

Last edited by HAHADORI : 01-27-2009 at 08:29 AM.
HAHADORI is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-26-2009, 05:00 PM  
gagou
A Defias Bandit
Interface Author - Click to view interfaces

Forum posts: 2
File comments: 140
Uploads: 1
BarFader with party support

it seems that oUF_BarFader now support all units but when I join a party I got a problem with UnitAffectingCombat(unit) because unit is nil
to solve this problem I had to test the existence of unit so the function update transform in:

Code:
local function Update(self)
	local unit = self.unit
	if unit then
		if(self.Castbar and (self.Castbar.casting or self.Castbar.channeling)) then
			self:SetAlpha(self.BarFadeMaxAlpha or 1)
		elseif(UnitAffectingCombat(unit)) then
			self:SetAlpha(self.BarFadeMaxAlpha or 1)
		elseif(unit == 'pet' and GetPetHappiness()) then
			self:SetAlpha((GetPetHappiness() < 3) and (self.BarFadeMaxAlpha or 1) or (self.BarFadeMinAlpha or 0.25))
		elseif(UnitExists(unit..'target')) then
			self:SetAlpha(self.BarFadeMaxAlpha or 1)
		elseif(Regenerating(unit)) then
			self:SetAlpha(self.BarFadeMaxAlpha or 1)
		else
			self:SetAlpha(self.BarFadeMinAlpha or 0.25)
		end
	end
end
(I did some debuging and found that the first call to the function update for party have nil as unit)

in my layout I spawn the party with
local party = oUF:Spawn('header', 'oUF_Party')
party:SetManyAttributes('yOffset', -5, 'showParty', true)

I tried also with
party:SetManyAttributes('yOffset', -5, 'showParty', true, 'showPlayer', true) to check if the first unit in party won't be nil, but no change it's still nil.

is it a problem with oUF_BarFader or directly with oUF?
gagou is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-23-2008, 08:08 PM  
p3lim
A Scalebane Royal Guard
 
p3lim's Avatar
Interface Author - Click to view interfaces

Forum posts: 441
File comments: 756
Uploads: 18
Quote:
Originally posted by Quokka
Jup but it's still faded out for some reason
Ill look into it.


edit:
You should have said it was channeled. All my abilities that is channeled uses mana, and hence, makes it visible due the mana drop.
In other words, r12 fixes it.

Last edited by p3lim : 11-23-2008 at 08:19 PM.
p3lim is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-23-2008, 05:24 PM  
Quokka
A Cliff Giant
Interface Author - Click to view interfaces

Forum posts: 76
File comments: 56
Uploads: 4
Quote:
Originally posted by p3lim
When you are fishing youre casting right?
Jup but it's still faded out for some reason
Quokka is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-23-2008, 01:26 PM  
p3lim
A Scalebane Royal Guard
 
p3lim's Avatar
Interface Author - Click to view interfaces

Forum posts: 441
File comments: 756
Uploads: 18
Quote:
Originally posted by Quokka
is there a way to have it shown while fishing?
When you are fishing youre casting right?
p3lim is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.




The Network:
EQInterface | EQ2Interface | LoTROInterface | MMOInterface | War.MMOUI | WoWInterface | VGInterface | Allakhazam | Thottbot | Wowhead | Zam


©2009 MMOUI / ZAM Network
vBulletin - Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.