View Single Post
03-17-09, 10:01 AM   #908
coree
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 28
how can i prevent that the castbar will be overlapped sometimes by the castbar safezone.

Code:
self.Castbar = CreateFrame("StatusBar", nil, self)
self.Castbar:SetPoint("TOPRIGHT", self, "BOTTOMRIGHT", 0, -21)
self.Castbar:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 0, -21)
self.Castbar:SetStatusBarTexture(texture2)
self.Castbar:SetStatusBarColor(0.2705882352941176, 0.407843137254902, 0.5450980392156862)
self.Castbar:SetBackdrop(backdrop)
self.Castbar:SetBackdropColor(0, 0, 0)
self.Castbar:SetHeight(15)
self.Castbar:SetWidth(300)
self.Castbar:SetToplevel(true)

self.Castbar.Time = SetFontString(self.Castbar, fontn, 14, "THINOUTLINE")
self.Castbar.Time:SetPoint("RIGHT", self.Castbar, -3, 1)
self.Castbar.Time:SetJustifyH("RIGHT")
self.Castbar.CustomTimeText = OverrideCastbarTime

self.Castbar.Text = SetFontString(self.Castbar, fontn, 14, "THINOUTLINE")
self.Castbar.Text:SetPoint("LEFT", self.Castbar, 3, 1)
self.Castbar.Text:SetPoint("RIGHT", self.Castbar.Time, "LEFT")

self.Castbar.bg = self.Castbar:CreateTexture(nil, "BORDER")
self.Castbar.bg:SetAllPoints(self.Castbar)
self.Castbar.bg:SetTexture(0.3, 0.3, 0.3)
		
if(cbarsafe == true and unit == "player") then
	self.Castbar.SafeZone = self.Castbar:CreateTexture(nil,"ARTWORK")
	self.Castbar.SafeZone:SetTexture(texture2)
	self.Castbar.SafeZone:SetVertexColor(.69,.31,.31)
	self.Castbar.SafeZone:SetPoint("TOPRIGHT")
	self.Castbar.SafeZone:SetPoint("BOTTOMRIGHT")
end
any idea ?

Last edited by coree : 03-19-09 at 10:56 AM.