10-09-13, 02:09 AM
|
#6
|
A Pyroguard Emberseer
Join Date: Jul 2008
Posts: 1,740
|
@Rainrider
I have my own absorbbar module. That's why.
Module
http://code.google.com/p/rothui/sour...otalAbsorb.lua
Create Function
Lua Code:
--total absorb func.totalAbsorb = function(self) if not self.cfg.totalabsorb or (self.cfg.totalabsorb and not self.cfg.totalabsorb.show) then return end local w = self.Health:GetWidth() if w == 0 then w = self:GetWidth()-24.5-24.5 --raids and party have no width on the health frame for whatever reason, thus use self and subtract the setpoint values end local absorbBar = CreateFrame("StatusBar", nil, self.Health) --new anchorpoint, absorb will now overlay the healthbar from right to left absorbBar:SetFrameLevel(self.Health:GetFrameLevel()+1) absorbBar:SetPoint("TOPRIGHT", self.Health, 0, 0) absorbBar:SetPoint("BOTTOMRIGHT", self.Health, 0, 0) absorbBar:SetWidth(w) absorbBar:SetStatusBarTexture(self.cfg.totalabsorb.texture) absorbBar:SetStatusBarColor(self.cfg.totalabsorb.color.bar.r,self.cfg.totalabsorb.color.bar.g,self.cfg.totalabsorb.color.bar.b,self.cfg.totalabsorb.color.bar.a) absorbBar:SetReverseFill(true) -- Register with oUF self.TotalAbsorb = absorbBar end
Result:
Basically I overlay the healthbar with the absorb bar from right-to-left. The healprediction is underneath.
That way when loosing health I can easily see how much of the health lost is covered by a shield. My shield display caps at maxhealth.
I see no point in adding absorb bar to the healprediction display. Healprediction fills up health that is lost. Absorbbar shows how much of your health is covered by a shield.
My orb uses the same module, just a different create function.
http://code.google.com/p/rothui/sour...player.lua#389
Sidenote
I really would have loved to not using a fake statusbar on my orb. The problem is that when setting
Lua Code:
bar:SetOrientation("VERTICAL") bar:SetReverseFill(true)
The statusbar texture crop is wrong. At least for what I'm needing. It will look like the texture is moving in from the top, not filling top-to-bottom.
I tried to hook the SetTexCoord function call on the statusbar texture to swap some values but it does not fire :/
Funny enough before applying the Smooth module I tried changing the SetTexCoord via the PostUpdate function but when PostUpdate was called (after SetValue) the SetTexCoord on the statusbar texture had not yet been applied. GetTexCoord() always delivered the old value, never the new one. Wierd!
|
__________________
| 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-09-13 at 06:19 AM.
|
|
|