Thread: PvP Icon
View Single Post
09-17-09, 04:22 AM   #7
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Icerat View Post
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
  Reply With Quote