Thread: oUF_Phanx edit
View Single Post
04-28-13, 06:15 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Simply adding a "fadeOut" key to the frame doesn't do anything. You would need to write some additional code to animate the opacity of the castbar to achieve that. I'd suggest using the animation API but I don't have time to write the actual code for you. If you have another layout that already does this, you'd need to find and copy the rest of the code it uses to handle fading.

Also, the code you posted is only not raising an error because it's never actually run. You need to attach it to the castbar so oUF will run it when the active cast stops. Find the line in Frames.lua that sets "Castbar.PostCastStart = ns.PostCastStart" and add a similar line attaching your PostCastStop function.

However, your PostCastStop function as written will not work, and will raise an error about passing a nil value to "unpack". Most likely you should just change "unpack(self.CompleteColor)" to just hardcode the color you want, eg. "self:SetStatusBarColor(1, 0, 0)".
__________________
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