View Single Post
03-01-09, 06:18 AM   #831
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Oh hi, again

Allright, i'm trying something here, have a backdrop colored around my frames to replace the default self.Threat, and it works, well, in a weird way.

This is the function
Code:
local function OverrideUpdateThreat(self, event, unit)
	local isTanking, state, scaledPercent, rawPercent, threatValue = UnitDetailedThreatSituation("player", unit)
		if threatValue then
			r, g, b = self.ColorGradient(scaledPercent/100, .33,.59,.33, .65,.63,.35, .69,.31,.31)
			self.Threat:SetBackdropBorderColor(r,g,b)
			self.Threat:Show()
		else
			self.Threat:Hide()
		end
end
Code:
		self.Threat = CreateFrame('Frame', nil, self)
		self.Threat:SetPoint('TOPLEFT', self, 'TOPLEFT', -4, 4)
		self.Threat:SetPoint('BOTTOMRIGHT', self, 'BOTTOMRIGHT', 4.5, -4.5)
--		self.Threat:SetFrameStrata('BACKGROUND')
		self.Threat:SetBackdrop({
		  edgeFile = 'Interface\\AddOns\\oUF_Caellian\\media\\glowTex', edgeSize = 5,
		  insets = {left = 3, right = 3, top = 3, bottom = 3}
		})
It appears to me to be correct, but once ingame, it's the hostile unit that's getting the backdrop glowing (target, or target of target if i target my pet), and the coloring seems correct aswell, but it should be my frame or even my pet frame affected, not my target. It's like if it was working the opposite way it should.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 03-01-09 at 07:21 AM. Reason: typos