Thread Tools Display Modes
10-28-09, 03:39 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Texture castbar

Hi,

I want to create a castbar that will consist of a texture and thus needs to be calculated on every castbar update.

Finally want to be able to do this


http://www.wowinterface.com/download...-oUF_Orbs.html

The RingThing allows me to do the mana and the health ring currently but I still need a solution for the castbar.

I want to do it the same way I did it for the orbs and the rings, so basically creating a fake statusbar like this
Code:
    self.Castbar = CreateFrame("StatusBar", nil, self)
and using something like this to call a local function that will do the castbar caluclation for me.
Code:
    self.PostUpdateHealth = calc_ring_health
    self.PostUpdatePower = calc_ring_mana
Example is for health and mana updates, is there anything for the castbar?

What I found is: "OnCastbarUpdate"

So, can I do this?
Code:
self.OnCastbarUpdate = calc_ring_castbar
If thats not possible I could use this to start a onUpdate function myself...but I think that would be pretty bad.
Code:
      self.Castbar:SetScript("OnShow", function(_) start_sth() end)
      self.Castbar:SetScript("OnHide", function(_) end_sth() end)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 10-28-09 at 04:05 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Texture castbar


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