Originally Posted by Icerat
Wow many thanks Haste just what i was after, may i ask how it works so i can learn from it as i would like to do the same for the rested icon.
|
You don't need to apply the same logic mess to the Resting icon. If we compare the states the icons have we get this:
PvP: Show(FFA/Horde/Alliance)/Hide
Resting: Show/Hide
This means that we just have to set a texture with a static color on the Resting icon to make it work properly. The extra code on the PvP element is just to handle updating of it.
Due to this all you have to do is:
Code:
local resting = self.Health:CreateTexture(nil, "OVERLAY")
resting:SetTexture(1, 0, 0)
resting:SetHeight(18)
resting:SetWidth(18)
resting:SetPoint("BOTTOMLEFT", -13, -13)
self.Resting = resting