Change Log:
b3:
- set the minmax statusbar values on all events to make this work for changing targets
b2:
- Set the minmax values on the incoming heal bars when enabling the element
b1:
- initial beta version
Description:
** Cataclysm only! **
oUF element to display incoming heal values using the new Blizzard API.
To display a bar for incoming heals your oUF layout needs to define a parameter self.HealPrediction:
local mhpb = CreateFrame('StatusBar', nil, self.Health)
mhpb:SetPoint('TOPLEFT', self.Health:GetStatusBarTexture(), 'TOPRIGHT', 0, 0)
mhpb:SetPoint('BOTTOMLEFT', self.Health:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0)
mhpb:SetWidth(width)
mhpb:SetStatusBarTexture(config.TEXTURE)
mhpb:SetStatusBarColor(0, 1, 0.5, 0.25)
local ohpb = CreateFrame('StatusBar', nil, self.Health)
ohpb:SetPoint('TOPLEFT', mhpb:GetStatusBarTexture(), 'TOPRIGHT', 0, 0)
ohpb:SetPoint('BOTTOMLEFT', mhpb:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0)
ohpb:SetWidth(width)
ohpb:SetStatusBarTexture(config.TEXTURE)
ohpb:SetStatusBarColor(0, 1, 0, 0.25)
self.HealPrediction = {
-- status bar to show my incoming heals
myBar = mhpb,
-- status bar to show other peoples incoming heals
otherBar = ohpb,
-- amount of overflow past the end of the health bar
maxOverflow = 1.05,
-- PreUpdate function (optional)
PreUpdate = function(element, unit)
...
end,
-- PostUpdate function (optional)
PostUpdate = function(element, unit)
...
end,
-- Override function (optional)
Override = function(self, event, unit)
...
end,
}
If you only want to display heals from others than you can omit the self.HealPrediction.myBar definition, and similarly if you only wish to see heals from yourself you can omit the self.HealPrediction.otherBar definition.
** ensure status bar width is set correctly or they will not be shown **
ToDo:
- Support for vertical bars (maybe, might just need to set orientation in the layout)
There is no support for displaying incoming heal values as a text string as this function... |
|