Quantcast WoWInterface - View Single Post - oUF - Layout discussion
View Single Post
09-25-09, 01:12 PM   #1190
Icerat
A Fallenroot Satyr
Join Date: Sep 2006
Posts: 28
Currently using the following to show a small yellow square to indicate if my toon is resting or not.

Code:
--	RESTING ICON --
	if(unit == "player") then
		if UnitLevel("player") ~= MAX_PLAYER_LEVEL then
			self.Resting = self.Health:CreateTexture(nil, "OVERLAY")
			self.Resting:SetHeight(6)
			self.Resting:SetWidth(6)
			self.Resting:SetPoint("BOTTOMLEFT", 13, -15)
			self.Resting:SetTexture(1, 1, 0)
			
			self.Resting.bg = self.Health:CreateTexture(nil, "BACKGROUND")
			self.Resting.bg:SetPoint("TOPLEFT",self.Resting,"TOPLEFT", -2, 2)
			self.Resting.bg:SetPoint("BOTTOMRIGHT",self.Resting,"BOTTOMRIGHT",2,-2)	
			self.Resting.bg:SetTexture(0, 0, 0)
		end	
	end
The problem I'm having is with the background part, when i leave a city or inn the rested icon vanishes as expected but I'm left with the small black square for the border.

How can i make the background square disappear also?

Thanks in advance for helping a nub out