View Single Post
09-05-11, 10:58 AM   #2
Thalyra
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 13
use the .HealPrediction element (its part of oUF in the actual version)

here is an example:

Code:
local myBar = CreateFrame("Statusbar", nil, self.Health)
myBar:SetWidth(self.Health:GetWidth())
myBar:SetStatusBarTexture(texture)
myBar:SetStatusBarColor(0, 1, 0)
myBar:SetPoint("TOPLEFT", self.Health:GetStatusBarTexture(), "TOPRIGHT", 0, 0)
myBar:SetPoint("BOTTOMLEFT", self.Health:GetStatusBarTexture(), "BOTTOMRIGHT", 0, 0)

local otherBar = CreateFrame("Statusbar", nil, self.Health)
otherBar:SetWidth(self.Health:GetWidth())
otherBar:SetStatusBarTexture(texture)
otherBar:SetStatusBarColor(0, 1, 0)
otherBar:SetPoint("TOPLEFT", myBar:GetStatusBarTexture(), "TOPRIGHT", 0, 0)
otherBar:SetPoint("BOTTOMLEFT", myBar:GetStatusBarTexture(), "BOTTOMRIGHT", 0, 0)

self.HealPrediction = {
    myBar = myBar,
    otherBar = otherBar,
    maxOverflow = 1.05 -- means 5 % overflow
}
  Reply With Quote