View Single Post
08-20-09, 09:57 AM   #2
v6o
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 399
Code:
CreateFrame("StatusBar")
http://www.wowwiki.com/Widget_API#StatusBar

You'd still have to set width, height, color, min/max values and whatnot. Register events for health or mana and whatever you'd need to update your statusbar.

e.g

Code:
NameOfStatusBar:SetScript("OnEvent", function(self, event, unit)
  if event=="UNIT_HEALTH" and unit=="player" then
    NameOfStatusBar:SetValue(UnitHealth("player"))
  end
end)
NameOfStatusBar:RegisterEvent("UNIT_HEALTH")
__________________
I stopped playing back World of Warcraft in 2010 and I have no plans on returning.
This is a dead account and if you want to continue any of my addons or make a fork then feel free to do so.
This is your permission slip.

If you need to contact me, do so on Twitter @v6ooo

Best regards, v6.
  Reply With Quote